gtk-container, gtk-widget, g-initially-unowned, gtk-buildable, gtk-orientable, g-object, common-lisp:standard-object, common-lisp:t
gtk-app-chooser-widget, gtk-button-box, gtk-color-chooser-widget, gtk-file-chooser-button, gtk-font-chooser-widget, gtk-font-selection, gtk-hbox, gtk-info-bar, gtk-recent-chooser-widget, gtk-statusbar, gtk-vbox
The gtk-box widget organizes child widgets into a rectangular area.
The rectangular area of a gtk-box is organized into either a single row or a single column of child widgets depending upon the orientation. Thus, all children of a gtk-box are allocated one dimension in common, which is the height of a row, or the width of a column.
gtk-box uses a notion of packing. Packing refers to adding widgets with reference to a particular position in a gtk-container. For a gtk-box, there are two reference positions: the start and the end of the box. For a vertical gtk-box, the start is defined as the top of the box and the end is defined as the bottom. For a horizontal gtk-box the start is defined as the left side and the end is defined as the right side.
Use repeated calls to the function gtk-box-pack-start to pack widgets into a gtk-box from start to end. Use the function gtk-box-pack-end to add widgets from end to start. You may intersperse these calls and add widgets from both ends of the same gtk-box.
Because gtk-box is a gtk-container, you may also use the function gtk-container-add to insert widgets into the box, and they will be packed with the default values for the child properties expand and fill.
Use the function gtk-container-remove to remove widgets from the gtk-box.
Use the function gtk-box-homogeneous to specify whether or not all children of the gtk-box are forced to get the same amount of space.
Use the function gtk-box-spacing to determine how much space will be minimally placed between all children in the gtk-box. Note that spacing is added between the children, while padding added by the functions gtk-box-pack-start or gtk-box-pack-end is added on either side of the widget it belongs to.
Use the function gtk-box-reorder-child to move a gtk-box child to a different place in the box.
Use the function gtk-box-set-child-packing to reset the expand, fill and padding child properties. Use the function gtk-box-query-child-packing to query these fields.
Note that a single-row or single-column gtk-grid provides exactly the same functionality as gtk-box.
Child Property Details
The expand child propertyexpand of type :boolean (Read / Write)
Whether the child should receive extra space when the parent grows. Note that the default value for this property is nil for gtk-box. Note that the halign, valign, hexpand and vexpand properties are the preferred way to influence child size allocation in containers.
Default value: nil
The fill child propertyfill of type :boolean (Read / Write)
Whether the child should receive extra space when the parent grows. Note that the halign, valign, hexpand and vexpand properties are the preferred way to influence child size allocation in containers.
Default value: true
The pack-type child propertypack-type of type gtk-pack-type (Read / Write)
A gtk-pack-type indicating whether the child is packed with reference to the start or end of the parent.
Default value: :start
The padding child propertypadding of type :uint (Read / Write)
Extra space to put between the child and its neighbors, in pixels.
Allowed values: <= G_MAXINT
Default value: 0
The position child propertyposition of type :int (Read / Write)
The index of the child in the parent.
Allowed values: <= G_MAXULONG
Default value: 0
Slot Access Functions
Inherited Slot Access Functions