|
|
|
|
|
Displayed Versus Stored Value |
|
|
|
|
|
|
|
|
Sometimes the value you are searching for resides between two numbers that are very far apart, such as 0 and 1,000,000. Stepping through each of those values one by one would be tedious. You can change the step value of the displayed number using the -resolution option. The default for -resolution is 1, but it can be changed to any value that is less or greater than that. |
|
|
|
|
|
|
|
|
Note that if the resolution is larger than 1, it is possible for the slider to have a value (set by the program, for example) that is smaller or larger than the displayed value. |
|
|
|
|
|
|
|
|
You can add a label to your scale by using the -label option. The label is placed in a different location depending on the value associated with -orient (see Figure 10-2). |
|
|
|
|
|
|
|
|
Figure 10-2.
Two scales with labels |
|
|
|
|
|
|
|
|
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 -tickinter-val => 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-3. |
|
|
|
|