True if this element is active.
An active control is the one with keyboard focus—that is, the one that accepts keystrokes, or in the case of a Button, is selected when the user types Return or Enter in Windows, or the space bar in Mac OS.
The alignment style for this element. If defined, this value overrides the alignChildren setting for the parent container.
This can be a single string, which indicates the alignment for the orientation specified in the parent container, or an array of two strings, indicating both the horizontal and vertical alignment (in that order). Allowed values depend on the orientation value of the parent container. They are not case sensitive.
- For orientation=row:
- For orientation=column:
- For orientation=stack:
The boundaries of the element, in parent-relative coordinates.
Setting an element's size or location changes its bounds property, and vice-versa.
|children||Array of Object||readonly||An array of child ListItem elements.|
True if this element is enabled.
An enabled element can accept input, according to its type. When false, control elements do not accept input, and all types of elements have a dimmed appearance.
|graphics||ScriptUIGraphics||readonly||The graphics object that can be used to customize the element's appearance, in response to the |
|helpTip||String||r/w||The help text that is displayed when the mouse hovers over the element.|
The number of pixels to indent the element during automatic layout.
Applies for column orientation and left alignment, or row orientation and top alignment.
The width and height in pixels of each item in the list.
Used by auto-layout to determine the
preferredSize of the list, if not otherwise specified. If not set explicitly, the size of each item is set to match the largest height and width among all items in the list
|items||Array of ListItem||readonly|
The array of choice items displayed in the list.
Access this array with a 0-based index. To obtain the number of items in the list, use
items.length.The objects are created when items are specified on creation of the parent list object, or afterward using the list control’s add() method. Each item has a
selected property that is true when it is in the selected state.
The upper left corner of this element relative to its parent.
The location is defined as [bounds.x, bounds.y]. Setting an element's location changes its bounds property, and vice-versa.
|maximumSize||Dimension||r/w|| The maximum height and width to which the element can be resized.|
|minimumSize||Dimension||r/w|| The minimum height and width to which the element can be resized.|
|parent||Object||readonly||The parent element.|
The preferred size, used by layout managers to determine the best size for each element.
If not explicitly set by a script, value is established by the UI framework in which ScriptUI is employed, and is based on such attributes of the element as its text, font, font size, icon size, and other UI framework-specific attributes.A script can explicitly set preferredSize before the layout manager is invoked in order to establish an element size other than the default.
An object that contains one or more creation properties of the control (properties used only when the element is created).
Creation properties of a ListBox object can include:
multiselect: When false (the default), only one item can be selected. When true, multiple items can be selected.
items: An array of strings for the text of each list item. An item object is created for each item. An item with the text string "-" creates a separator item. Supply this property, or the items argument to the add() method, not both. This form is most useful for elements defined using Resource Specifications.
The currently selected item for a single-selection list, or an array of items for current selection in a multi-selection list.
Setting this value causes the selected item to be highlighted and to be scrolled into view if necessary. If no items are selected, the value is null. Set to null to deselect all items. You can set the value using the index of an item or an array of indices, rather than object references. If set to an index value that is out of range, the operation is ignored. When set with index values, the property still returns object references.
- If you set the value to an array for a single-selection list, only the first item in the array is selected.
- If you set the value to a single item for a multi-selection list, that item is added to the current selection.
|shortcutKey||String||r/w||The key sequence that invokes the |
onShortcutKey callback for this element (in Windows only).
The current dimensions of this element.
Initially undefined, and unless explicitly set by a script, it is defined by a LayoutManager. A script can explicitly set size before the layout manager is invoked to establish an element size other than the preferredSize or the default size, but this is not recommended. Defined as [bounds.width, bounds.height]. Setting an element's size changes its bounds property, and vice-versa.
|type||String||readonly||The element type; "listbox".|
True if this element is shown, false if it is hidden.
When a container is hidden, its children are also hidden, but they retain their own visibility values, and are shown or hidden accordingly when the parent is next shown.
|window||Window||readonly||The window that this element belongs to.|
|windowBounds||Bounds||readonly||The bounds of this element relative to the top-level parent window.|