If you know a y coordinate in the Listbox, you can determine the index of the nearest Listbox item to it by using the nearest method:
$index = $lb->nearest(y)
The nearest method returns a number that corresponds to the index of the closest visible Listbox item.
Copyright © 2002 O'Reilly & Associates. All rights reserved.