Hello Roger,
is there a possibility to set the size of the bitmap from a DCMENUITEM if the bitmap resource is an icon ?
You see in this picture, that they are loaded in a to big size.
Bitmap size of dcmenuitem
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Bitmap size of dcmenuitem
- Attachments
-
- test4.jpg (35.51 KiB) Viewed 5759 times
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: Bitmap size of dcmenuitem
Menue Bitmap must be 16x16.
look into Source of DCMENUITEM -> c:\exp19\Source\Dclipx\_dcclass.prg
look into Source of DCMENUITEM -> c:\exp19\Source\Dclipx\_dcclass.prg
Code: Select all
oBmp := ::ItemImages[aInfo[1]]
IF oBmp != NIL .AND. ::bitmaps
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} )
ENDIF
ENDIF
greetings by OHR
Jimmy
Jimmy
Re: Bitmap size of dcmenuitem
Try this:
oIcon := XbpIcon():new():create()
oIcon:loadFile('myicon.ico',16,16)
DCMENUITEM 'My Menu Item' ICONS {oIcon}
oIcon := XbpIcon():new():create()
oIcon:loadFile('myicon.ico',16,16)
DCMENUITEM 'My Menu Item' ICONS {oIcon}
The eXpress train is coming - and it has more cars.
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Bitmap size of dcmenuitem
Thanks, i will try that.
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang