Interactive ElementsButtons

A collection of buttons.

Instance Properties

Name Description Access
length number The number of objects in the collection. read-only

Methods

add(
[layer] ​[, at], reference ​[, withProperties])
 → Button
anyItem(
)
 → Button
count(
)
 → number
everyItem(
)
 → Button
firstItem(
)
 → Button
item(
index)
 → Button
itemByID(
id)
 → Button
itemByName(
name)
 → Button
itemByRange(
from, to)
 → Button
lastItem(
)
 → Button
middleItem(
)
 → Button
nextItem(
obj)
 → Button
previousItem(
obj)
 → Button
toSource(
)
 → string
add(
[layer] ​[, at=LocationOptions.UNKNOWN], reference ​[, withProperties])
 → Button
Creates a new Button
layer Layer The layer on which to create the Button. (Optional)
at LocationOptions The location at which to insert the Button relative to the reference object or within the container object. (Optional)
reference The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem. (Optional)
withProperties Object Initial values for properties of the new Button (Optional)
anyItem(
)
 → Button
Returns any Button in the collection.
count(
)
 → number
Displays the number of elements in the Button.
everyItem(
)
 → Button
Returns every Button in the collection.
firstItem(
)
 → Button
Returns the first Button in the collection.
item(
index)
 → Button
Returns the Button with the specified index or name.
index The index or name. Can accept: Long Integer or String.
itemByID(
id)
 → Button
Returns the Button with the specified ID.
id number The ID.
itemByName(
name)
 → Button
Returns the Button with the specified name.
name string The name.
itemByRange(
from, to)
 → Button
Returns the Buttons within the specified range.
from The Button, index, or name at the beginning of the range. Can accept: Button, Long Integer or String.
to The Button, index, or name at the end of the range. Can accept: Button, Long Integer or String.
lastItem(
)
 → Button
Returns the last Button in the collection.
middleItem(
)
 → Button
Returns the middle Button in the collection.
nextItem(
obj)
 → Button
Returns the Button whose index follows the specified Button in the collection.
obj Button The Button whose index comes before the desired Button.
previousItem(
obj)
 → Button
Returns the Button with the index previous to the specified index.
obj Button The index of the Button that follows the desired Button.
toSource(
)
 → string
Generates a string which, if executed, will return the Button.