Please, if possible, in future versions, enter the function ButtonBmp [ RESOURCE <cBitmap> ], keeping the [ BITMAP <cBitmap> ], to make it compatible with the commands of the other buttons. To facilitate this we switched from one button to another.
- Code: Select all Expand view
/*----------------------------------------------------------------------------//
!short: BUTTONBMP */
#xcommand @ <nRow>, <nCol> BUTTONBMP [ <oBtn> ] ;
[ SIZE <nWidth>, <nHeight> ] ;
[ ACTION <uAction> ] ;
[ <default: DEFAULT> ] ;
[ <of:OF, WINDOW, DIALOG> <oWnd> ] ;
[ <help:HELP, HELPID, HELP ID> <nHelpId> ] ;
[ FONT <oFont> ] ;
[ <pixel: PIXEL> ] ;
[ <design: DESIGN> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
[ WHEN <WhenFunc> ] ;
[ VALID <uValid> ] ;
[ <lCancel: CANCEL> ] ;[b]
[ BITMAP <cBitmap> ] ;[/b] // [ RESOURCE <cBitmap> ]
[ PROMPT <cPrompt> ] ;
[ <cPostext: TEXTTOP, TEXTBOTTOM, TEXTLEFT, TEXTRIGHT> ] ;
[ TOOLTIP <cToolTip> ] ;
=> ;
[ <oBtn> := ] TButtonBmp():New( <nRow>, <nCol>, <cPrompt>, <oWnd>,;
<{uAction}>, <nWidth>, <nHeight>, <nHelpId>, <oFont>, <.default.>,;
<.pixel.>, <.design.>, <cMsg>, <.update.>, <{WhenFunc}>,;
<{uValid}>, <.lCancel.>, <cBitmap>, [ Upper(<(cPostext)>) ], <cToolTip> )
#xcommand REDEFINE BUTTONBMP [ <oBtn> ] ;
[ ID <nId> [ <of:OF, WINDOW, DIALOG> <oDlg> ] ] ;
[ ACTION <uAction,...> ] ;
[ <help:HELP, HELPID, HELP ID> <nHelpId> ] ;
[ MESSAGE <cMsg> ] ;
[ <update: UPDATE> ] ;
[ WHEN <WhenFunc> ] ;
[ VALID <uValid> ] ;
[ PROMPT <cPrompt> ] ;
[ <lCancel: CANCEL> ] ;[b]
[ BITMAP <cBitmap> ] ;[/b] [ RESOURCE <cBitmap> ]
[ <cPostext: TEXTTOP, TEXTBOTTOM, TEXTLEFT, TEXTRIGHT> ] ;
[ TOOLTIP <cToolTip> ] ;
=> ;
[ <oBtn> := ] TButtonBmp():ReDefine( <nId>, [\{||<uAction>\}], <oDlg>,;
<nHelpId>, <cMsg>, <.update.>, <{WhenFunc}>, <{uValid}>,;
<cPrompt>, <.lCancel.>, <cBitmap>, [ Upper(<(cPostext)>) ], <cToolTip> )
Thank you,