def set_digits(digits
)
def get_digits()
def set_draw_value(draw_value
)
def get_draw_value()
def set_value_pos(pos
)
def get_value_pos()
def get_layout()
def get_layout_offsets()
|
def set_digits(digits
)
def get_digits()
def set_draw_value(draw_value
)
def get_draw_value()
def set_value_pos(pos
)
def get_value_pos()
def get_layout()
def get_layout_offsets()
|
|
The gtk.Scale
widget is
an abstract base class, used only for deriving the subclasses gtk.HScale
and gtk.VScale
. A gtk.Scale
is a slider
control used to select a numeric value. Since gtk.Scale
is a
subclass of gtk.Range
, see the
gtk.Range
methods for additional methods. To set the value of a scale, you would
normally use set_value
().
To detect changes to the value, you would normally use the "value_changed"
signal.
def set_digits(digits
)
| the number of decimal places to display |
The set_digits
() method sets the
"digits" property to the value specified by digits
.
The value of digits
specifies the number of decimal
places that are displayed in the value. The value of the adjustment is also
rounded off to this number of digits if "draw-value" is
True
, so the retrieved value matches the value the user
sees. If the "draw-value" property has been set to False
by using the set_draw_value
()
method, the adjustment value will not be rounded at all.
def get_digits()
Returns : | the number of decimal places that are displayed. |
The get_digits
() method returns the
value of the "digits" property that indicates the number of decimal places
that are displayed in the value.
def set_draw_value(draw_value
)
| If True draw the current
value next to the slider |
The set_draw_value
() method sets the
"draw-value" property to the value specified by
draw_value
. If draw_value
is
True
the current value is displayed next to the
slider.
def get_draw_value()
Returns : | True if the current value is
to be drawn next to the slider |
The get_draw_value
() method returns the
value of the "draw-value" property. If "draw-value" is
True
the current scale value is drawn next to the
slider.
def set_value_pos(pos
)
| the position where the current value is displayed. |
The set_value_pos
() method sets the
value of the "value-pos" property to the value specified by
pos
. The value of pos
must be
one of: gtk.POS_LEFT
, gtk.POS_RIGHT
,
gtk.POS_TOP
or gtk.POS_BOTTOM
.
def get_value_pos()
Returns : | the position where the current value is displayed. |
The get_value_pos
() method returns the
value of the "value-pos" property. See the set_value_pos
()
method.
def get_layout()
Returns : | the pango.Layout
for this scale or None if the draw_value
property is False . |
This method is available in PyGTK 2.4 and above.
The get_layout
() method returns the
pango.Layout
used to display the scale.
def get_layout_offsets()
Returns : | a 2-tuple containing the coordinates where the
scale will draw the pango.Layout
representing the text in the scale |
This method is available in PyGTK 2.4 and above.
The get_layout_offsets
() method returns
a 2-tuple containing the coordinates where the scale will draw the pango.Layout
representing the text in the scale. Remember when using the pango.Layout
function you need to convert to and from pixels using the pango.PIXELS
()
function or pango.SCALE
. If the "draw-value" property is
False
, the return values are undefined.
def callback(scale
, value
, user_param1
, ...
)
| the scale that received the signal |
| the value to be formatted |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
Returns : | a string representing
value for display |
The "format-value" signal is emitted when the scale is being
redrawn with a value displayed. The "format-value" signal handler should
return a formatted string containing value
.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.