BoxLayout#
Superclasses: LayoutManager
, Object
Implemented Interfaces: Orientable
GtkBoxLayout
is a layout manager that arranges children in a single
row or column.
Whether it is a row or column depends on the value of its
orientation
property. Within the other dimension
all children all allocated the same size. The GtkBoxLayout
will respect
the halign
and valign
properties of each child widget.
If you want all children to be assigned the same size, you can use
the homogeneous
property.
If you want to specify the amount of space placed between each child,
you can use the spacing
property.
Constructors#
- class BoxLayout
- classmethod new(orientation: Orientation) LayoutManager #
Creates a new
GtkBoxLayout
.- Parameters:
orientation – the orientation for the new layout
Methods#
- class BoxLayout
- get_baseline_child() int #
Gets the value set by
set_baseline_child()
.Added in version 4.12.
- get_baseline_position() BaselinePosition #
Gets the value set by
set_baseline_position()
.
- set_baseline_child(child: int) None #
Sets the index of the child that determines the baseline in vertical layout.
Added in version 4.12.
- Parameters:
child – the child position, or -1
- set_baseline_position(position: BaselinePosition) None #
Sets the baseline position of a box layout.
The baseline position affects only horizontal boxes with at least one baseline aligned child. If there is more vertical space available than requested, and the baseline is not allocated by the parent then the given
position
is used to allocate the baseline within the extra space available.- Parameters:
position – a
GtkBaselinePosition