gtk.Misc a base class for widgets with alignments and padding. Synopsis gtk.Misc gtk.Widget set_alignment xalign yalign get_alignment set_padding xpad ypad get_padding Ancestry +-- gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Misc Implemented Interfaces gtk.Misc implements gtk.Buildable gtk.Misc Properties gtk.Object Properties gtk.Widget Properties
"xalign" Read-Write The horizontal alignment, from 0.0 to 1.0 "xpad" Read-Write The amount of space to add on the left and right of the widget, in pixels "yalign" Read-Write The vertical alignment, from 0.0 to 1.0 "ypad" Read-Write The amount of space to add above and below the widget, in pixels
gtk.Misc Style Properties gtk.Widget Style Properties gtk.Misc Signal Prototypes gobject.GObject Signal Prototypes gtk.Object Signal Prototypes gtk.Widget Signal Prototypes Description The gtk.Misc widget is an abstract widget used to derive subclasses which have alignment and padding attributes. The horizontal and vertical padding attributes allow extra space to be added around the widget. The horizontal and vertical alignment attributes enable the widget to be positioned within its allocated area. The alignment values represent the fraction of available free space (allocation minus the widget size) to place to the left or above the widget for x and y alignment respectively. Note that if the widget is added to a container in such a way that it expands automatically to fill its allocated area, the alignment settings will have no effect. Methods gtk.Misc.set_alignment set_alignment xalign yalign xalign : the horizontal alignment yalign : the vertical alignment The set_alignment() method sets the alignment of the widget in its allocated space. xalign sets the fraction (0.0-1.0) of free space (horizontal allocation minus widget width) to place to the left of the widget. yalign sets the fraction (0.0-1.0) of free space (vertical allocation minus widget height) to place above the widget. gtk.Misc.get_alignment get_alignment Returns : a tuple containing the X and Y alignments of the widget The get_alignment() method returns a tuple containing the X and Y alignments of the widget within its allocation. See set_alignment(). gtk.Misc.set_padding set_padding xpad ypad xpad : the amount of space to add on the left and right of the widget, in pixels. ypad : the amount of space to add on the top and bottom of the widget, in pixels. The set_padding() method sets the amount of space to add around the widget. The xpad value specifies the number of pixels of padding to add to the left and right of the widget. The yalign value specifies the number of pixels to add above and below the widget. gtk.Misc.get_padding get_padding Returns : a tuple containing the horizontal and vertical padding in pixels for the widget. The get_padding() method returns a tuple containing the padding in the horizontal and vertical directions of the widget. See set_padding().