F > FListBox.setSelectedIndex

 

FListBox.setSelectedIndex

FListBox, FListBox.setSelectedIndex, setSelectedIndex

Availability

Flash Player 6.

Usage

myListBox.setSelectedIndex(index)

Parameters

index An integer specifying the index of the item to select in the list box.

Returns

Nothing.

Description

Method; selects the item at the specified index and updates the list box.

The ListBox component uses a zero-based index, where the item at index 0 is displayed at the top of the list.

Example

The following code selects the fifth item in the list box.

toyList.setSelectedIndex(4);

See also

FListBox.getSelectedIndex, FListBox.getSelectedIndices