MenuItems
See also MenuItem.
QuickLinks
Properties
Property | Type | Access | Description |
---|---|---|---|
length | number | readonly | The number of objects in the collection. |
Methods
Instances
MenuItem [] (index:
number)
Returns the MenuItem with the specified index.
Parameter | Type | Description |
---|---|---|
index | number | The index. |
MenuItem add (associatedMenuAction:
MenuAction[, at:
LocationOptions=LocationOptions.AT_END][, reference:
MenuElement][, withProperties:
Object])
Creates a new menu item.
Parameter | Type | Description |
---|---|---|
associatedMenuAction | MenuAction | The menu action that implements the menu item. |
at | LocationOptions: LocationOptions.BEFORE LocationOptions.AFTER LocationOptions.AT_END LocationOptions.AT_BEGINNING LocationOptions.UNKNOWN | The location of the menu item relative to the reference object or within the containing object. (Optional) (default: LocationOptions.AT_END) |
reference | MenuElement | The reference object. Note: Required when the at parameter specifies before or after. (Optional) |
withProperties | Object | Initial values for properties of the new MenuItem (Optional) |
MenuItem anyItem ()
Returns any MenuItem in the collection.
number count ()
Displays the number of elements in the MenuItem.
Array
of MenuItem everyItem ()
Returns every MenuItem in the collection.
MenuItem firstItem ()
Returns the first MenuItem in the collection.
MenuItem item (index:
varies)
Returns the MenuItem with the specified index or name.
Parameter | Type | Description |
---|---|---|
index | Long Integer String | The index or name. Can accept: Long Integer or String. |
MenuItem itemByID (id:
number)
Returns the MenuItem with the specified ID.
Parameter | Type | Description |
---|---|---|
id | number | The ID. |
MenuItem itemByName (name:
string)
Returns the MenuItem with the specified name.
Parameter | Type | Description |
---|---|---|
name | string | The name. |
Array
of MenuItem itemByRange (from:
varies, to:
varies)
Returns the MenuItems within the specified range.
Parameter | Type | Description |
---|---|---|
from | Long Integer MenuItem String | The MenuItem, index, or name at the beginning of the range. Can accept: MenuItem, Long Integer or String. |
to | Long Integer MenuItem String | The MenuItem, index, or name at the end of the range. Can accept: MenuItem, Long Integer or String. |
MenuItem lastItem ()
Returns the last MenuItem in the collection.
MenuItem middleItem ()
Returns the middle MenuItem in the collection.
MenuItem nextItem (obj:
MenuItem)
Returns the MenuItem whose index follows the specified MenuItem in the collection.
Parameter | Type | Description |
---|---|---|
obj | MenuItem | The MenuItem whose index comes before the desired MenuItem. |
MenuItem previousItem (obj:
MenuItem)
Returns the MenuItem with the index previous to the specified index.
Parameter | Type | Description |
---|---|---|
obj | MenuItem | The index of the MenuItem that follows the desired MenuItem. |
string toSource ()
Generates a string which, if executed, will return the MenuItem.
Element of
Menu.menuItems
Submenu.menuItems
Jongware, 29-Apr-2012 v3.0.3i | Contents :: Index |