F > FListBox.setSelectedIndices |  |

FListBox.setSelectedIndices

FListBox, FListBox.setSelectedIndices, setSelectedIndices

Availability

Flash Player 6.

Usage

    myListBox.setSelectedIndices(indexArray)

Parameters

`indexArray` An array of item indexes to select in the list box.

Returns

Nothing.

Description

Method; selects the items specified in the array of indexes 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 creates an array called `myArray` specifying the items to select in `toyList` and then passes the array to the `setSelectedIndices` method.

    var myArray = new Array (1,4,5,7);
    toyList.setSelectedIndices(myArray);

See also

`FListBox.getSelectedIndices`