Gtk::Scale
widgets (or "sliders") allow the user to
visually select and manipulate a value within a specific range. You
might use one, for instance, to adjust the
magnification level on a zoomed preview of a picture, or to control
the brightness of a colour, or to specify the number of minutes of
inactivity before a screensaver takes over the screen.
As with Scrollbar
s, the orientation can be either
horizontal or vertical. The default constructor creates an
Adjustment
with all of its values set to
0.0
. This isn't useful so you will need to set some
Adjustment
details to get meaningful behaviour.
Scale
widgets can display their current value as a number
next to the trough. By default they show the value, but you can change this
with the set_draw_value()
method.
The value displayed by a scale widget is rounded to one decimal point
by default, as is the value
field in its
Gtk::Adjustment
. You can change this with the
set_digits()
method.
Also, the value can be drawn in different positions relative to the trough,
specified by the set_value_pos()
method.