gtk.ButtonBoxthe base class for widgets that contain multiple
buttonsSynopsisgtk.ButtonBoxgtk.Boxget_layoutset_layoutlayout_styleget_child_secondarychildset_child_secondarychildis_secondaryAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.Box
+-- gtk.ButtonBox
Implemented Interfacesgtk.ButtonBox
implements
gtk.Buildablegtk.ButtonBox Propertiesgtk.Object Propertiesgtk.Widget Propertiesgtk.Container Propertiesgtk.Box Properties
"layout-style"Read/Writethe style used to layout the buttons in the box. The layout
styles are: gtk.BUTTONBOX_SPREAD,
gtk.BUTTONBOX_EDGE,
gtk.BUTTONBOX_START and
gtk.BUTTONBOX_END.
"child-internal-pad-x"ReadThe amount of padding that increases a child's size on
the top and bottom"child-internal-pad-y"ReadThe amount of padding that increases a child's size on
the top and bottom"child-min-height"ReadThe minimum height of buttons inside the box."child-min-width"ReadThe minimum width of buttons inside the box.
"secondary"Read/WriteIf True, the child appears in a secondary
group of children, suitable for, e.g., help buttons.
gtk.ButtonBox Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal PrototypesDescriptionA button box is used to provide a consistent layout of buttons
throughout an application. The gtk.ButtonBox is
subclassed by the gtk.HButtonBox
and gtk.VButtonBox
classes to provide horizontal and vertical button layouts respectively. The
same effect could be achieved by using a gtk.Box but less
conveniently.A buttonbox provides one default layout and a default spacing
value that are persistent across all widgets. The layout/spacing can then be
altered by the programmer, or if desired, by the user to alter the 'feel' of
a program to a small degree.The gtk.Box.get_spacing()
method and the gtk.Box.set_spacing()
methods retrieve and change the default number of pixels between buttons.
The get_layout()
and set_layout()
methods retrieve and alter the style used to spread the buttons in a button
box across the container. The layout styles are:
gtk.BUTTONBOX_SPREAD,
gtk.BUTTONBOX_EDGE,
gtk.BUTTONBOX_START and
gtk.BUTTONBOX_END.Methodsgtk.ButtonBox.get_layoutget_layoutReturns :the layout style used by the
buttonboxThe get_layout() method returns the
current value of the "layout-style" property. The possible values are:
gtk.BUTTONBOX_SPREAD,
gtk.BUTTONBOX_EDGE,
gtk.BUTTONBOX_START and
gtk.BUTTONBOX_END.gtk.ButtonBox.set_layoutset_layoutlayout_stylelayout_style :the new layout styleThe set_layout() method sets the
"layout-style" property to the value in layout_style.
The possible values are: gtk.BUTTONBOX_SPREAD,
gtk.BUTTONBOX_EDGE,
gtk.BUTTONBOX_START and
gtk.BUTTONBOX_END.gtk.ButtonBox.get_child_secondaryget_child_secondarychildchild :a child button of the
buttonboxReturns :if True, the
child appears in a secondary group of the button
box.This method is available in PyGTK 2.4 and above.The get_child_secondary() method
returns True if child should
appear in a secondary group of children. See the set_child_secondary()
method for more information.gtk.ButtonBox.set_child_secondaryset_child_secondarychildis_secondarychild :a child button of the
buttonboxis_secondary :if True, the
child appears in a secondary group of the button
box.The set_child_secondary() method sets
whether child should appear in a secondary group of
children. The typical use of a secondary child is the help button in a
dialog that is displayed away from the main group of buttons e.g. right
aligned.The secondary group appears after the other children if the
style is gtk.BUTTONBOX_START,
gtk.BUTTONBOX_SPREAD or
gtk.BUTTONBOX_EDGE, and before the the other children if
the style is gtk.BUTTONBOX_END. For horizontal button
boxes, the definition of before/after depends on direction of the widget
(see gtk.Widget.set_direction()).
If the style is gtk.BUTTONBOX_START or
gtk.BUTTONBOX_END, then the secondary children are
aligned at the other end of the button box from the main children. For the
other styles, they appear immediately next to the main children.