Selector()

For use with DuAEF.DuScriptUI.
A drop down selector.
This is not a real class, and cannot be instanciated.
Use DuAEF.DuScriptUI.addSelector to create a Selector.
The Selector inherits the Group object from ScriptUI and has all of its properties and methods.

new Selector()

Properties:
Name Type Description
image string The path to the current image (or a PNG as a string representation)
icon Image The Image currently displayed
label StaticText The current text
items Array.<DuButton> The buttons
index int The current index
onChange Selector~onChange The function to execute when the index changes.
You can set your own function here, which must take no argument.
The method is called after the index has changed.

Methods

static addButton(text, image, helpTip, imageOver)

Adds a new button to the selector
Parameters:
Name Type Description
text string The text displayed by the button
image string The icon, either a path to the file or a PNG represented as a string.
helpTip string The help tip
imageOver string The roll over icon, either a path to the file or a PNG represented as a string.

static removeAll()

Removes all buttons from the selector

static setCurrentIndex(index)

Changes the selection and the current index of the selector
Parameters:
Name Type Description
index int The new index

Type Definitions

onChange()

The function to execute when the index changes.
The method is called after the index has changed.