InDesign2026
API 21.5.1.73
Collection of Widget

Widgets

A collection of widgets.

Properties

NameType AccessDescription
Number readonly The number of objects in the collection.

Methods

→ Widget

Returns the Widget with the specified index.

index Number The index.
→ Widget

Returns any Widget in the collection.

→ Number

Displays the number of elements in the Widget.

→ Widget[]

Returns every Widget in the collection.

→ Widget

Returns the first Widget in the collection.

→ Widget

Returns the Widget with the specified index or name.

index LongInteger | String The index or name. Can accept: Long Integer or String.
→ Widget

Returns the Widget with the specified ID.

id Number The ID.
→ Widget[]

Returns the Widgets within the specified range.

from LongInteger | Widget | String The Widget, index, or name at the beginning of the range. Can accept: Widget, Long Integer or String.
to LongInteger | Widget | String The Widget, index, or name at the end of the range. Can accept: Widget, Long Integer or String.
→ Widget

Returns the last Widget in the collection.

→ Widget

Returns the middle Widget in the collection.

→ Widget

Returns the Widget whose index follows the specified Widget in the collection.

obj Widget The Widget whose index comes before the desired Widget.
→ Widget

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

obj Widget The index of the Widget that follows the desired Widget.
→ String

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

Object of 5

Properties elsewhere that hold a Widgets.