Gtk.BoxLayout¶
class — extends LayoutManager, Orientable
Arranges children in a single row or column.
Whether it is a row or column depends on the value of its
Orientable.orientation property. Within the other dimension
all children all allocated the same size. The GtkBoxLayout will respect
the Widget.halign and Widget.valign
properties of each child widget.
If you want all children to be assigned the same size, you can use
the BoxLayout.homogeneous property.
If you want to specify the amount of space placed between each child,
you can use the BoxLayout.spacing property.
Constructors¶
new¶
Creates a new GtkBoxLayout.
Parameters:
orientation— the orientation for the new layout
Methods¶
get_baseline_child¶
Gets the value set by BoxLayout.set_baseline_child.
get_baseline_position¶
Gets the value set by BoxLayout.set_baseline_position.
get_homogeneous¶
Returns whether the layout is set to be homogeneous.
get_spacing¶
Returns the space that box_layout puts between children.
set_baseline_child¶
Sets the index of the child that determines the baseline in vertical layout.
Parameters:
child— the child position, or -1
set_baseline_position¶
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— aGtkBaselinePosition
set_homogeneous¶
Sets whether the box layout will allocate the same size to all children.
Parameters:
homogeneous—Trueto set the box layout as homogeneous
set_spacing¶
Sets how much spacing to put between children.
Parameters:
spacing— the spacing to apply between children
Properties¶
baseline_child¶
The child that determines the baseline of the box in vertical layout.
If the child does baseline positioning, then its baseline is lined up with the baseline of the box. If it doesn't, then the bottom edge of the child is used.
baseline_position¶
The position of the allocated baseline within the extra space allocated to each child.
This property is only relevant for horizontal layouts containing at least one child with a baseline alignment.
homogeneous¶
Whether the box layout should distribute the available space equally among the children.
spacing¶
The space to put between the children.