%rc - Register Command


To register a command for %mb (Multi-button Toolbar) or in general.


winio@('%rc', btn_index, cb_func )
INTEGER btn_index
EXTERNAL cb_func


Caret (^) - An additional callback that controls the greying of the associated button.


The toolbar control %mb (Multi-button Toolbar) takes just one callback function and this is designed to respond to the "callback reason" MB_COMMAND. Having a single callback can be limiting especially if there are lots of buttons on a toolbar. %rc allows you to register a callback for any individual button. 'btn_index' is the index of the button; numbering starts at 1 and you must include any separators in the numbering. 'cb_func' is the callback to be called when the button is pressed and can of course be a standard callback. The callback can be run programmatically using DO_COMMAND@.

See also

%mb (Multi-button Toolbar), DO_COMMAND@




Copyright © 1999-2020 Silverfrost Limited