MenuItems
A collection of menu items.
Go to Property Listing | Method Listing
Methods:
[], add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource
Property Listing
Property |
Type |
Access |
Description |
---|---|---|---|
readonly |
The number of objects in the collection. |
Method Listing
MenuItem [] (index:Number)
Returns the MenuItem with the specified index.
Parameter |
Type |
Description |
---|---|---|
index |
The index. |
MenuItem add (associatedMenuAction:MenuAction, [at:LocationOptions=LocationOptions], reference:MenuElement, withProperties:Object)
Creates a new menu item.
Parameter |
Type |
Description |
---|---|---|
associatedMenuAction |
The menu action that implements the menu item. |
|
at |
The location of the menu item relative to the reference object or within the containing object. (Optional) (default: LocationOptions.AT_END) |
|
reference |
The reference object. Note: Required when the at parameter specifies before or after. (Optional) |
|
withProperties |
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.
MenuItem everyItem ()
Returns every MenuItem in the collection.
MenuItem firstItem ()
Returns the first MenuItem in the collection.
MenuItem item (index:Varies LongInteger String)
Returns the MenuItem with the specified index or name.
Parameter |
Type |
Description |
---|---|---|
index |
LongInteger |
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 |
The ID. |
MenuItem itemByName (name:String)
Returns the MenuItem with the specified name.
Parameter |
Type |
Description |
---|---|---|
name |
The name. |
MenuItem itemByRange (from:Varies LongInteger MenuItem String, to:Varies LongInteger MenuItem String)
Returns the MenuItems within the specified range.
Parameter |
Type |
Description |
---|---|---|
from |
LongInteger |
The MenuItem, index, or name at the beginning of the range. Can accept: MenuItem, Long Integer or String. |
to |
LongInteger |
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 |
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 |
The index of the MenuItem that follows the desired MenuItem. |
String toSource ()
Generates a string which, if executed, will return the MenuItem.
Object of
Menu.menuItems
Submenu.menuItems