F > FListBox.setScrollPosition |
FListBox.setScrollPosition
FListBox, FListBox.setScrollPosition, setScrollPosition
Availability
Flash Player 6.
Usage
myListBox.setScrollPosition(index)
Parameters
index An integer specifying the index of the item to display at the top of the list box.
Returns
Nothing.
Description
Method; causes the list box to scroll so that the specified item is displayed at the top.
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 displays the fifth item in toyList at the top of the list.
toyList.setScrollPosition(4);
See also