Blitz3D+ Command Reference

DisableToolBarItem toolbar,index

Parameters

toolbar - toolbar gadget

index - zero-based index of the button to disable

Description

Disables one toolbar button so it cannot be clicked.

Requires Extended language mode.

Greys out a single button on a toolbar created with CreateToolBar - the Save button until something changes, Paste until there is something to paste. A disabled button posts no gadget-action events.

The index is the button's zero-based position in the icon strip - the same number a click delivers in EventData - and an index outside the toolbar is a runtime error. The toolbar redraws itself immediately; no update call is needed. Re-enable with EnableToolBarItem.

The world editor shell sample shows the toolbar this manages.

See also: EnableToolBarItem, CreateToolBar, SetToolBarTips, DisableMenu, DisableGadget.

Index