home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeMastering Perl/TkSearch this book

7.15. Bounding Box

The method bbox returns a list of four elements that describes the bounding box around the text at index:

($x, $y, $w, $h) = $lb->bbox(index);

The four elements are (in order): x, y, w, and h. x and y are the (x, y) coordinates at the upper-lefthand corner of the bounding box. The w is the width of the text in pixels. The h is the height of the text in pixels. These measurements, relative to the Listbox, are shown in Figure 7-6.

Figure 7-6

Figure 7-6. Bounding box values around text



Library Navigation Links

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