start page | rating of books | rating of authors | reviews | copyrights

Book HomeMastering Perl/TkSearch this book

7.16. Finding an Index by y Coordinate

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.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.