If the pushbutton image is an icon object, DC_XbpPushButtonXP:Draw() runs into an error here (around line 1135):
Code: Select all
ELSEIF Valtype( cCaption ) == 'O' .AND. (cCaption:isDerivedFrom('XbpBitMap') .OR. cCaption:isDerivedFrom('XbpIcon'))
oBitmap := cCaption
aSource := {0,0,oBitmap:xSize,oBitmap:ySize}
aTarget := { nStartCol, nStartRow, nEndCol, nEndRow }
oBitmap:draw( oPS, aTarget, aSource, ;
IIF(lDisabled .AND. ::disabledBmp,GRA_BLT_ROP_PATCOPY,nil), GRA_BLT_BBO_IGNORE ) // abo service
Code: Select all
ELSEIF Valtype( cCaption ) == 'O' .AND. (cCaption:isDerivedFrom('XbpBitMap') .OR. cCaption:isDerivedFrom('XbpIcon'))
oBitmap := cCaption
aSource := {0,0,oBitmap:xSize,oBitmap:ySize}
aTarget := { nStartCol, nStartRow, nEndCol, nEndRow }
IF cCaption:isDerivedFrom('XbpIcon') // new
oBitmap:draw( oPS, aTarget,IIF(lDisabled .AND. ::disabledBmp,XBP_STATE_DISABLED,XBP_STATE_NORMAL) )
ELSE
oBitmap:draw( oPS, aTarget, aSource, ;
IIF(lDisabled .AND. ::disabledBmp,GRA_BLT_ROP_PATCOPY,nil), GRA_BLT_BBO_IGNORE ) // abo service
ENDIF
1. If a button has an image and a text caption, the text caption is one pixel higher as it should be.
2. Tooltips and hotkeys seem not to work with the BUTTONS clause of DCGET OPTIONS (items 9 and 10 of the buttons array).