positionCollection

positionCollection(obj: Object;
                   row: Integer);

The positionCollection method of the ListBox class positions the collection attached to the list box control to an object in that collection and to a position within the list box.

Use the obj parameter to specify the object to be positioned and the row parameter to specify the visible row in which to position that object.

You can use this method to scroll through an existing collection display by specifying the new position of an object within the current display. For example, the following code fragment scrolls the collection view so that the second item is positioned in the top row.

listBox1.positionCollection(listBox1.itemObject[2], 1);

When using the positionCollection method: