|Controls: List Boxes||
To populate a list box at design time, select the list box by clicking on it, then select the Items property in the Properties window. Click the ellipses, and begin typing the list items, ending each line with an Enter. When you have completed your entries simply click the Okay button.
To force the list box to display (move focus to) the most recent addition to the list box, you need the index of the last item added. You can obtain this from the value returned by Items.Add. For example,
To highlight that most recent addition, use the setSelected method. For example,
To synchronize two list boxes in order to display related elements (such as student name in one box and grade in another), see this link.
To reset a list box so that entries are no longer highlighted, first set the list index to 0 and then reset it to -1.