Difference between revisions of "toolpalette.enable"

From Inspired-Lua Wiki
Jump to navigation Jump to search
m (Text replace - "| <u>" to "| <u><center>")
Line 14: Line 14:
 
! Parameter !! Type !! Description
 
! Parameter !! Type !! Description
 
|-
 
|-
| <u>toolname</u> || string ||  name of the top level toolbox
+
| <u><center>toolname</u> || string ||  name of the top level toolbox
 
|-
 
|-
| <u>itemname</u> || string || name of the menu item
+
| <u><center>itemname</u> || string || name of the menu item
 
|-
 
|-
| <u>state</u> || boolean || value that enables the menu item if true or disables the menu item if false.
+
| <u><center>state</u> || boolean || value that enables the menu item if true or disables the menu item if false.
 
|}
 
|}
  

Revision as of 23:41, 30 May 2011

toolpalette.enable is a function that is part of the toolpalette.

This routine enables or disables a menu item in the tool palette.
This routine returns true if the menu item was properly enabled or disabled. It returns nil if no tool palette has been previously registered by the script app or if the toolname / itemname pair cannot be found in the registered menu items.

This has been introduced in TI-Nspire OS 3.0 (Changes).


Syntax

toolpalette.enable(toolname, itemname, state)

Parameter Type Description
toolname
string name of the top level toolbox
itemname
string name of the menu item
state
boolean value that enables the menu item if true or disables the menu item if false.

Example

toolpalette.enable("theToolpalette", "firstMenuItem", true)

See also