Gtk.BoxLayout¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.LayoutManager (6), GObject.Object (37), Gtk.Orientable (2)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.BoxLayout(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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 [property`Gtk`.Orientable:orientation] property. Within the other dimension all children all allocated the same size. The
GtkBoxLayout
will respect the [property`Gtk`.Widget:halign] and [property`Gtk`.Widget:valign] properties of each child widget.If you want all children to be assigned the same size, you can use the [property`Gtk`.BoxLayout:homogeneous] property.
If you want to specify the amount of space placed between each child, you can use the [property`Gtk`.BoxLayout:spacing] property.
- classmethod new(orientation)[source]¶
- Parameters:
orientation (
Gtk.Orientation
) – the orientation for the new layout- Returns:
a new box layout
- Return type:
Creates a new
GtkBoxLayout
.
- get_baseline_child()[source]¶
- Returns:
the index of the child that determines the baseline in vertical layout, or -1
- Return type:
Gets the value set by
Gtk.BoxLayout.set_baseline_child
().New in version 4.12.
- get_baseline_position()[source]¶
- Returns:
the baseline position
- Return type:
Gets the value set by
Gtk.BoxLayout.set_baseline_position
().
- get_spacing()[source]¶
- Returns:
the spacing of the layout
- Return type:
Returns the space that self puts between children.
- set_baseline_child(child)[source]¶
- Parameters:
child (
int
) – the child position, or -1
Sets the index of the child that determines the baseline in vertical layout.
New in version 4.12.
- set_baseline_position(position)[source]¶
- Parameters:
position (
Gtk.BaselinePosition
) – aGtkBaselinePosition
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.
Property Details¶
- Gtk.BoxLayout.props.baseline_child¶
- Name:
baseline-child
- Type:
- Default Value:
-1
- Flags:
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.
New in version 4.12.
- Gtk.BoxLayout.props.baseline_position¶
- Name:
baseline-position
- Type:
- Default Value:
- Flags:
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.
- Gtk.BoxLayout.props.homogeneous¶
- Name:
homogeneous
- Type:
- Default Value:
- Flags:
Whether the box layout should distribute the available space equally among the children.
- Gtk.BoxLayout.props.spacing¶
- Name:
spacing
- Type:
- Default Value:
0
- Flags:
The space to put between the children.