Adobe InDesign CS3 (5.0) Object Model JS: Submenus

InDesign CS3

Class

Submenus

 A collection of submenus.

QuickLinks

add, anyItem, count, everyItem, firstItem, item, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

Submenu add (title: string[, at: LocationOptions=LocationOptions.AT_END][, reference: MenuElement][, withProperties: Object])
Creates a new submenu.

ParameterTypeDescription
titlestringThe name of the Submenu 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.
atLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The location of the submenu relative to the reference object or within the containing object. (Optional) (default: LocationOptions.AT_END)
referenceMenuElementThe reference object. Note: Required when the at parameter specifies before or after. (Optional)
withPropertiesObjectInitial values for properties of the new Submenu (Optional)

Submenu anyItem ()
Returns any Submenu in the collection.

number count ()
Displays the number of elements in the Submenu.

Array of Submenu everyItem ()
Returns every Submenu in the collection.

Submenu firstItem ()
Returns the first Submenu in the collection.

Submenu item (index: any)
Returns the Submenu with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer or String.

Submenu itemByName (name: string)
Returns the Submenu with the specified name.

ParameterTypeDescription
namestringThe name.

Array of Submenu itemByRange (from: any, to: any)
Returns the Submenus within the specified range.

ParameterTypeDescription
fromLong Integer
String
Submenu
The Submenu, index, or name at the beginning of the range. Can accept: Submenu, Long Integer or String.
toLong Integer
String
Submenu
The Submenu, index, or name at the end of the range. Can accept: Submenu, Long Integer or String.

Submenu lastItem ()
Returns the last Submenu in the collection.

Submenu middleItem ()
Returns the middle Submenu in the collection.

Submenu nextItem (obj: Submenu)
Returns the Submenu whose index follows the specified Submenu in the collection.

ParameterTypeDescription
objSubmenuThe Submenu whose index comes before the desired Submenu.

Submenu previousItem (obj: Submenu)
Returns the Submenu with the index previous to the specified index.

ParameterTypeDescription
objSubmenuThe index of the Submenu that follows the desired Submenu.

string toSource ()
Generates a string which, if executed, will return the Submenu.

Element of

Menu.submenus

Submenu.submenus

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