InDesign2026
API 21.5.1.73
Object

Submenu

A submenu.

MenuElement Submenu

Properties

NameType AccessDescription
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> readonly A collection of events.
Number readonly The index of the Submenu within its containing object.
Boolean readonly Returns true if the object specifier resolves to valid objects.
MenuElements<MenuElement> readonly A collection of menu elements.
MenuItems<MenuItem> readonly A collection of menu items.
MenuSeparators<MenuSeparator> readonly A collection of menu separators.
String readonly The name of the Submenu.
Menu | Submenu readonly The parent of the Submenu (a Menu or Submenu).
Object read/write A property that allows setting of several properties at the same time.
Submenus<Submenu> readonly A collection of submenus.
String readonly 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.

Events

NameDescription
Dispatched before the Submenu is displayed. This event does not bubble. This event is not cancelable.

Methods

EventListener

Adds an event listener.

eventType String The event type.
handler File | JavaScriptFunction The event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
Submenu[]

Resolves the object specifier, creating an array of object references.

void

Deletes the Submenu.

Boolean

Removes the event listener.

eventType String The registered event type.
handler File | JavaScriptFunction The registered event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
String

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

String

Retrieves the object specifier.

Object of 7

Properties elsewhere that hold a Submenu.

Parameter of 3

Method parameters that accept a Submenu.

Return 13

Methods that return a Submenu.