MenuItem
QuickLinks
Hierarchy
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 MenuItem is enabled. |
eventListeners | EventListeners | readonly | A collection of event listeners. |
events | Events | readonly | A collection of events. |
id | number | readonly | The unique ID of the MenuItem. |
index | number | readonly | The index of the MenuItem within its containing object. |
isValid | bool | readonly | Returns true if the object specifier resolves to valid objects. |
name | string | readonly | The name of the MenuItem. |
parent | MenuSubmenu | 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
Instances
EventListener addEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Adds an event listener.
Parameter | Type | Description |
---|---|---|
eventType | string | The event type. |
handler | File JavaScript Function | The event handler. Can accept: File or JavaScript Function. |
captures | bool | This parameter is obsolete. (Optional) (default: false) |
Array of MenuItem getElements ()
Resolves the object specifier, creating an array of object references.
void remove ()
Deletes the MenuItem.
bool removeEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Removes the event listener.
Parameter | Type | Description |
---|---|---|
eventType | string | The registered event type. |
handler | File JavaScript Function | The registered event handler. Can accept: File or JavaScript Function. |
captures | bool | This parameter is obsolete. (Optional) (default: false) |
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:
MenuItem MenuItems.nextItem (obj: MenuItem)
MenuItem MenuItems.previousItem (obj: MenuItem)
Return
Array of MenuItem MenuItem.getElements ()
MenuItem MenuItems.[] (index: number)
MenuItem MenuItems.add (associatedMenuAction: MenuAction[, at: LocationOptions=LocationOptions.AT_END][, reference: MenuElement][, withProperties: Object])
MenuItem MenuItems.anyItem ()
Array of MenuItem MenuItems.everyItem ()
MenuItem MenuItems.firstItem ()
MenuItem MenuItems.item (index: varies)
MenuItem MenuItems.itemByID (id: number)
MenuItem MenuItems.itemByName (name: string)
Array of MenuItem MenuItems.itemByRange (from: varies, to: varies)
MenuItem MenuItems.lastItem ()
MenuItem MenuItems.middleItem ()
MenuItem MenuItems.nextItem (obj: MenuItem)
MenuItem MenuItems.previousItem (obj: MenuItem)
Jongware, 20-Jun-2010 v3.0.3d | Contents :: Index |