Submenus

A collection of submenus.

Methods

Submenuadd (title:
string[, at:
LocationOptions=AT_END ][, 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
:
BEFORE
AFTER
AT_END
AT_BEGINNING
UNKNOWN
The location of the submenu relative to the reference object or within the containing object. (Optional) (default: 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)

SubmenuanyItem ()
Returns any Submenu in the collection.

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

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

SubmenufirstItem ()
Returns the first Submenu in the collection.

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

Parameter Type Description
index Long Integer
String
The index or name. Can accept: Long Integer or String.

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

Parameter Type Description
name string The name.

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

Parameter Type Description
from Submenu
Long Integer
String
The Submenu, index, or name at the beginning of the range. Can accept: Submenu, Long Integer or String.
to Submenu
Long Integer
String
The Submenu, index, or name at the end of the range. Can accept: Submenu, Long Integer or String.

SubmenulastItem ()
Returns the last Submenu in the collection.

SubmenumiddleItem ()
Returns the middle Submenu in the collection.

SubmenunextItem (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.

SubmenupreviousItem (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.

Element of:

Menu.submenus
Submenu.submenus

Leave a Comment

Previous post:

Next post: