Enables or disables a specific toolbar button by button ID.
Takes toolbarID (Int), buttonID (Int), and enabled (Int).
Returns 1 on success, 0 if toolbar not found.
BGI GUI
Parameters & Returns
Parameters
toolbarIDInt
buttonIDInt
enabledInt
Returns
Int
Quick Summary
Enables or disables a specific toolbar button by button ID.
Takes toolbarID (Int), buttonID (Int), and enabled (Int).
Returns 1 on success, 0 if toolbar not found.
Technical Exegesis...
Enables or disables a specific toolbar button by its button ID (command ID). Searches gizmoMap for the toolbar ID. Sends TB_ENABLEBUTTON message with buttonID and MAKELONG(enabled, 0) - enabled in low word, 0 in high word. Returns 1 on success, 0 if toolbar not found.
This function dynamically controls whether a toolbar button is clickable. buttonID is the command ID specified in bgiAddToolbarButton. enabled is boolean (non-zero = enable button, 0 = disable/gray button).
Enables or disables a specific toolbar button by its button ID (command ID). Searches gizmoMap for the toolbar ID. Sends TB_ENABLEBUTTON message with buttonID and MAKELONG(enabled, 0) - enabled in low word, 0 in high word. Returns 1 on success, 0 if toolbar not found.
This function dynamically controls whether a toolbar button is clickable. buttonID is the command ID specified in bgiAddToolbarButton. enabled is boolean (non-zero = enable button, 0 = disable/gray button). Disabled buttons appear grayed out and don't respond to clicks or generate events. Enabled buttons are clickable and send BGI_EVENT_COMMAND_CLICK events. Use for context-sensitive toolbars (enable/disable based on application state, selection, or document changes). For example, disable "Save" button when no changes, enable when document modified.