You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Tool Palette Library > enable

17.2 enable

toolpalette.enable(toolname, itemname, enable)

This routine enables or disables a menu item in the tool palette. Parameter toolname is a string containing the name of the top level tool box. Parameter itemname is a string containing the name of the menu item. Parameter enable is a Boolean value that enables the menu item if true or disables the menu item if false.

This routine returns true if the menu item was properly enabled or disabled. It returns nil if the toolname / itemname pair cannot be found in the registered menu items.

Note

toolpalette.register() must be called prior to toolpalette.enable().

Introduced in platform.apiLevel = '1.0'