EnableToolBarItem toolbar,index
Parameters
|
toolbar - toolbar gadget index - zero-based index of the button to enable |
Description
|
Re-enables a toolbar button disabled with DisableToolBarItem. Requires Extended language mode. The button loses its greyed-out look and clicking it posts gadget-action events ($401) again, with the button's index in EventData. Buttons start out enabled, so this is the second half of state-driven toolbars: an object gets selected, so Cut and Copy light up. The index is the button's zero-based position in the icon strip, and an index outside the toolbar is a runtime error. The toolbar redraws itself immediately; no update call is needed. The world editor shell sample shows the toolbar this manages. See also: DisableToolBarItem, CreateToolBar, SetToolBarTips, EnableMenu, EnableGadget. |
Index