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

Book HomeMastering Perl/TkSearch this book

10.7. Displaying Value Increments

The Scale displays its current value above or to the left of itself (depending on the value associated with -orient). Suppose you want to display labels (such as 0, 10, 20, ... 100) that show the user approximately where the button needs to be to select those values. If you want to display them underneath or to the left of the Scale, you can use the -tickinterval option. By default, it is set to 0 and no numbers are displayed. To show the values every 10 numbers, use -tickinterval => 10. The larger the range of values from which the Scale can select, the larger the value this should be, or you'll end up with a bunch of numbers so close together that you won't be able to tell what they are. See Figure 10-4.

Figure 10-4

Figure 10-4. Using -tickinterval with both horizontal and vertical Scales

Library Navigation Links

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