## DuAELayerSelector()

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

#### # new DuAELayerSelector()

##### Properties:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`index` | `int` | <optional> | 0 | The current layer index, 0 if None
`comp` | `CompItem` | `null` | <optional> | null | The composition linked to the selector. If set to null, the seletor will use the current active composition.
`selectedOnly` | `boolean` | <optional> | false | True to list only selected layers in the composition
`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.

View Source Duik_api_fordoc.jsxinc, line 18834

# Methods

#### # static refresh()

Force the refresh of the layer list

View Source Duik_api_fordoc.jsxinc, line 18867

#### # static setCurrentIndex(index)

Changes the selection and the current layer index of the selector

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | `int` | The new layer index

View Source Duik_api_fordoc.jsxinc, line 18859

# Type Definitions

#### # onChange()

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

View Source Duik_api_fordoc.jsxinc, line 18852