InDesign Server2025
API 20.5.0.49
Collection of Button

Buttons

A collection of buttons.

Properties

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

Methods

Button

Returns the Button with the specified index.

index Number The index.
Button

Creates a new Button

layer? Layer The layer on which to create the Button.
at? LocationOptions The location at which to insert the Button relative to the reference object or within the container object.
reference? Document | Layer | MasterSpread | Page | Spread | PageItem The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem.
withProperties? Object Initial values for properties of the new Button
Button

Returns any Button in the collection.

Number

Displays the number of elements in the Button.

Button[]

Returns every Button in the collection.

Button

Returns the first Button in the collection.

Button

Returns the Button with the specified index or name.

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

Returns the Button with the specified ID.

id Number The ID.
Button

Returns the Button with the specified name.

name String The name.
Button[]

Returns the Buttons within the specified range.

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

Returns the last Button in the collection.

Button

Returns the middle Button in the collection.

Button

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

obj Button The Button whose index comes before the desired Button.
Button

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

obj Button The index of the Button that follows the desired Button.
String

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

Object of 30

Properties elsewhere that hold a Buttons.