F > FComboBox.setSelectedIndex |  |

FComboBox.setSelectedIndex

FComboBox, FComboBox.setSelectedIndex, setSelectedIndex

Availability

Flash Player 6.

Usage

    myComboBox.setSelectedIndex(index)

Parameters

`index` An integer specifying the index of the item to select.

Returns

Nothing.

Description

Method; selects the specified item and updates the combo box to show the item as selected. Calling this method does not affect the current open or closed state of the drop-down list.This method cannot be used if the combo box is disabled.

The ComboBox 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 fourth item in the list of `menuMain`.

    menuMain.setSelectedIndex(3);

See also

`FComboBox.setRowCount`