gtk.Misca base class for widgets with alignments and
padding.Synopsisgtk.Miscgtk.Widgetset_alignmentxalignyalignget_alignmentset_paddingxpadypadget_paddingAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Misc
Implemented Interfacesgtk.Misc
implements
gtk.Buildablegtk.Misc Propertiesgtk.Object Propertiesgtk.Widget Properties
"xalign"Read-WriteThe horizontal alignment, from 0.0 to 1.0"xpad"Read-WriteThe amount of space to add on the left and right of the
widget, in pixels"yalign"Read-WriteThe vertical alignment, from 0.0 to 1.0"ypad"Read-WriteThe amount of space to add above and below the widget,
in pixels
gtk.Misc Style Propertiesgtk.Widget Style Propertiesgtk.Misc Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal PrototypesDescriptionThe 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.Methodsgtk.Misc.set_alignmentset_alignmentxalignyalignxalign :the horizontal alignmentyalign :the vertical alignmentThe 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_alignmentget_alignmentReturns :a tuple containing the X and Y alignments of the
widgetThe get_alignment() method returns a
tuple containing the X and Y alignments of the widget within its allocation.
See set_alignment().gtk.Misc.set_paddingset_paddingxpadypadxpad :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_paddingget_paddingReturns :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().