Adobe InDesign CS3 (5.0) Object Model JS: MenuItem

InDesign CS3

Class

MenuItem

 A menu item. Base Class: MenuElement

QuickLinks

getElements, remove, select, toSource, toSpecifier

Hierarchy

Menu | Submenu
MenuElement
MenuItem

Properties

PropertyTypeAccessDescription
associatedMenuActionMenuAction readonlyThe menu action that implements the menu item.
checkedbool readonlyIf true, the menu item associated with the menu action is checked.
enabledbool readonlyIf true, the MenuItem is enabled.
idnumber readonlyThe unique ID of the MenuItem.
indexnumber readonlyThe index of the MenuItem within its containing object.
namestring readonlyThe name of the MenuItem.
parentMenuSubmenu readonlyThe parent of the MenuItem (a Menu or Submenu).
propertiesObject r/wA property that allows setting of several properties at the same time.
titlestring readonlyThe 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

Array of MenuItem getElements ()
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:

array of MenuItem MenuItems.itemByRange (from: any, to: any)

MenuItem MenuItems.nextItem (obj: MenuItem)

MenuItem MenuItems.previousItem (obj: MenuItem)

Return

Array of MenuItem MenuItem.getElements ()

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: 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)

Jongware, 27-Jun-2010 v3.0.3dContents :: Index