%rc - Register Command

Purpose

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

Syntax

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

Modifiers

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

Description

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@

 

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited