A menu item.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| associatedMenuAction | MenuAction | readonly | The menu action that implements the menu item. |
| checked | bool | readonly | If true, the menu item associated with the menu action is checked. |
| enabled | bool | readonly | If true, the menu action is enabled. |
| id | number | readonly | The unique ID of the MenuItem. |
| index | number | readonly | The index of the MenuItem within its containing object. |
| name | string | readonly | The name of the MenuItem. |
| parent | any | readonly | The parent of the MenuItem (a Menu or Submenu). |
| properties | Object | r/w | A property that allows setting of several properties at the same time. |
| title | string | readonly | The name of the MenuItem for display in the user interface. The title includes any ampersand characters (&), which are used to tell the Windows OS to underline the following character in the name for use with the Alt key to navigate to a menu item. Double ampersands are used to display an actual ampersand character in the name. The Mac OS ignores and removes the extra ampersand characters. |
Methods
Array of MenuItemgetElements ()
Resolves the object specifier, creating an array of object references.
void remove ()
Deletes the MenuItem.
void select ()
Selects the MenuItem.
string toSource ()
Generates a string which, if executed, will return the MenuItem.
string toSpecifier ()
Retrieves the object specifier.
Used in:
MenuItems.previousItem (
obj:
MenuItem )
MenuItems.nextItem (
obj:
MenuItem )
Returned by:
Array of MenuItem MenuItem .getElements (
)
MenuItem MenuItems.add (
associatedMenuAction:
MenuAction[, at:
LocationOptions=AT_END ][, reference:
MenuElement][, withProperties:
Object]
)
MenuItem MenuItems.anyItem (
)
Array of MenuItem MenuItems.everyItem (
)
MenuItem MenuItems.firstItem (
)
MenuItem MenuItems.item (
index:
any
)
MenuItem MenuItems.itemByID (
id:
number
)
MenuItem MenuItems.itemByName (
name:
string
)
Array of MenuItem MenuItems.itemByRange (
from:
any, to:
any
)
MenuItem MenuItems.lastItem (
)
MenuItem MenuItems.middleItem (
)
MenuItem MenuItems.nextItem (
obj:
MenuItem
)
MenuItem MenuItems.previousItem (
obj:
MenuItem
)