Submenus

A collection of submenus.

Methods:

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

Property Listing

Property

Type

Access

Description

length

Number

readonly

The number of objects in the collection.

Method Listing

Submenu [] (index:Number)

Returns the Submenu with the specified index.

Parameter

Type

Description

index

Number

The index.

Submenu add (title:String, [at:LocationOptions=LocationOptions], reference:MenuElement, withProperties:Object)

Creates a new submenu.

Parameter

Type

Description

title

String

The 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.

at

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

The location of the submenu 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 Submenu (Optional)

Submenu anyItem ()

Returns any Submenu in the collection.

Number count ()

Displays the number of elements in the Submenu.

Submenu everyItem ()

Returns every Submenu in the collection.

Submenu firstItem ()

Returns the first Submenu in the collection.

Submenu item (index:Varies LongInteger String)

Returns the Submenu with the specified index or name.

Parameter

Type

Description

index

LongInteger

String

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

Submenu itemByName (name:String)

Returns the Submenu with the specified name.

Parameter

Type

Description

name

String

The name.

Submenu itemByRange (from:Varies LongInteger Submenu String, to:Varies LongInteger Submenu String)

Returns the Submenus within the specified range.

Parameter

Type

Description

from

LongInteger

Submenu

String

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

to

LongInteger

Submenu

String

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.

Parameter

Type

Description

obj

Submenu

The Submenu whose index comes before the desired Submenu.

Submenu previousItem (obj:Submenu)

Returns the Submenu with the index previous to the specified index.

Parameter

Type

Description

obj

Submenu

The index of the Submenu that follows the desired Submenu.

String toSource ()

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

Object of

Menu.submenus

Submenu.submenus