Having an issue with large bitmaps/icons in this combination.
If I have code on the DCBROWSE (oBrowse) with a menu attached to the right-click:
Code: Select all
    
DCSUBMENU oMenu ;
        PROMPT "Open Items" ;
        PARENT oBrowse ;
        OWNERDRAW
//menu items
DCMENUITEM "Change" ;
        BITMAP dBITMAP_FILE ;
        PARENT oMenu ;
        ACTION { || DO_SOMETHING() }
I adjusted your _dcclass.prg from (notice the 22s):
Code: Select all
IF oBmp != NIL .AND. ::bitmaps
      nY := ((aInfo[4][4] - 1 - aInfo[4][2]) - 22) /2
//      nY := ((aInfo[4][4] - 1 - aInfo[4][2]) - oBmp:ySize) /2
      IF oBmp:isDerivedFrom('XbpIcon')
        nY += aInfo[4][2]+3
        x := aInfo[4][1] + ::BarWidth + ITEM_SPACING *2
        y := nY
        oBmp:draw( oPS, { x, y, x + 22, y + 22 } )
      ELSE
        // nY += aInfo[4][2]
        // oBmp:draw( oPS, {aInfo[4][1] + ::BarWidth + ITEM_SPACING*2, nY} )
        nY += aInfo[4][2]+2
        x := aInfo[4][1] + ::BarWidth + ITEM_SPACING *2
        y := nY
        oBmp:draw( oPS, { x, y, x + 22, y +22} )
      ENDIF
   ENDIF
Code: Select all
IF oBmp != NIL .AND. ::bitmaps
      nY := ((aInfo[4][4] - 1 - aInfo[4][2]) - 16) /2
//      nY := ((aInfo[4][4] - 1 - aInfo[4][2]) - oBmp:ySize) /2
      IF oBmp:isDerivedFrom('XbpIcon')
        nY += aInfo[4][2]+3
        x := aInfo[4][1] + ::BarWidth + ITEM_SPACING *2
        y := nY
        oBmp:draw( oPS, { x, y, x + 16, y + 16 } )
      ELSE
        // nY += aInfo[4][2]
        // oBmp:draw( oPS, {aInfo[4][1] + ::BarWidth + ITEM_SPACING*2, nY} )
        nY += aInfo[4][2]+2
        x := aInfo[4][1] + ::BarWidth + ITEM_SPACING *2
        y := nY
        oBmp:draw( oPS, { x, y, x + 16, y +16 } )
      ENDIF
   ENDIFThat seemed to fix it everywhere. Is there a reason that you set it to 22?
Sven

