The gtk.Adjustment
that contains the current value of this scale button object.
"icons"
Read/Write
The names of the icons to be used by the scale button. The first item in the array
will be used in the button when the current value is the lowest value, the second
item for the highest value. All the subsequent icons will be used for all the other
values, spread evenly over the range of values. If there's only one icon name in the
icons array, it will be used for all the values. If only two icon names are in the
icons array, the first one will be used for the bottom 50% of the scale, and the
second one for the top 50%.
It is recommended to use at least 3 icons so that the GtkScaleButton reflects the
current value of the scale better for the users.
"orientation"
Read/Write
The orientation of the
gtk.ScaleButton's
popup window. Default value: gtk.ORIENTATION_VERTICAL.
Available from GTK+ 2.14.
"size"
Read/Write
The icon size. Default value: gtk.ICON_SIZE_SMALL_TOOLBAR.
gtk.ScaleButton
provides a button which pops up a scale widget. This kind of widget is commonly
used for volume controls in multimedia applications, and GTK+ provides a
gtk.VolumeButton
subclass that is tailored for this use case.
Constructor
gtk.ScaleButton(size, min, max, step, icons=None)
size :
A stock icon size.
min :
The minimum value of the scale (usually 0).
max :
The maximum value of the scale (usually 100).
step :
The stepping of value when a scroll-wheel event, or
up/down arrow event occurs (usually 2).
icons :
Optionally a list or tuple of icon names, you will be able to set the
list later with set_icons
The set_icons() method sets the icons to be used by the
scale button. For details, see the gtk.ScaleButton:icons property
for details.
gtk.ScaleButton.set_orientation
def set_orientation(icons)
orientation :
the new orientation.
Note
This method is available in PyGTK 2.14 and above.
The set_orientation() method sets the
orientation of the
gtk.ScaleButton's
popup window.
gtk.ScaleButton.set_value
def set_value(value)
value :
The new value of the scale button.
Note
This method is available in PyGTK 2.12 and above.
The set_value() method sets the current value of the scale;
if the value is outside the minimum or maximum range values, it will be
clamped to fit inside them. The scale button emits the
value-changed signal if the value changes.
Signals
The "popdown" gtk.ScaleButton Signal
def callback(scalebutton, user_param1, ...)
scalebutton :
the scalebutton that received the "popdown" signal
user_param1 :
the first user parameter (if any) specified
with the connect()
method
... :
additional user parameters (if
any)
Note
This signal is available in PyGTK 2.12 and above.
The "popdown" signal is a keybinding signal which gets emitted to popdown the scale widget.
The default binding for this signal is Escape.
The "popup" gtk.ScaleButton Signal
def callback(scalebutton, user_param1, ...)
scalebutton :
the scalebutton that received the "popup" signal
user_param1 :
the first user parameter (if any) specified
with the connect()
method
... :
additional user parameters (if
any)
Note
This signal is available in PyGTK 2.12 and above.
The "popup" signal is a keybinding signal which gets emitted to popup the scale widget.
The default bindings for this signal are Space, Enter and Return.