English 中文(简体)
PyGTK - Scale Class
  • 时间:2024-12-22

PyGTK - Scale Class


Previous Page Next Page  

This class acts as an abstract base class for HScale and VScale widgets. These widgets work as a spder control and select a numeric value.

The following methods of this abstract class are implemented by the HScale class and the VScale class −

    set_digits() − This sets number of decimal places to be used to display instantaneous value of widget.

    set_draw_value() − set to True, current value will be displayed next to the spder.

    set_value_pos() − This is the position at which the values are drawn. This can be either gtk.POS_LEFT, gtk.POS_RIGHT, gtk.POS_TOP or gtk.POS_BOTTOM.

An object of gtk.HScale class provides a horizontal spder, whereas an object of gtk.VScale class provides vertical spder. Both classes have identical constructors −

gtk.HScale(Adjustment = None)
gtk.VScale(Adjustment = None)

The adjustment object contains many attributes that provide access to value and bounds.

Advertisements