Gtk.GridLayout¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.GridLayout(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
GtkGridLayout
is a layout manager which arranges child widgets in rows and columns.Children have an “attach point” defined by the horizontal and vertical index of the cell they occupy; children can span multiple rows or columns. The layout properties for setting the attach points and spans are set using the [class`Gtk`.GridLayoutChild] associated to each child widget.
The behaviour of
GtkGridLayout
when several children occupy the same grid cell is undefined.GtkGridLayout
can be used like aGtkBoxLayout
if all children are attached to the same row or column; however, if you only ever need a single row or column, you should consider usingGtkBoxLayout
.- classmethod new()[source]¶
- Returns:
the newly created
GtkGridLayout
- Return type:
Creates a new
GtkGridLayout
.
- get_baseline_row()[source]¶
- Returns:
the global baseline row
- Return type:
Retrieves the row set with
Gtk.GridLayout.set_baseline_row
().
- get_column_spacing()[source]¶
- Returns:
the spacing between consecutive columns
- Return type:
Retrieves the spacing set with
Gtk.GridLayout.set_column_spacing
().
- get_row_baseline_position(row)[source]¶
- Parameters:
row (
int
) – a row index- Returns:
the baseline position of row
- Return type:
Returns the baseline position of row.
If no value has been set with [method`Gtk`.GridLayout.set_row_baseline_position], the default value of
Gtk.BaselinePosition.CENTER
is returned.
- get_row_spacing()[source]¶
- Returns:
the spacing between consecutive rows
- Return type:
Retrieves the spacing set with
Gtk.GridLayout.set_row_spacing
().
- set_baseline_row(row)[source]¶
- Parameters:
row (
int
) – the row index
Sets which row defines the global baseline for the entire grid.
Each row in the grid can have its own local baseline, but only one of those is global, meaning it will be the baseline in the parent of the self.
- set_column_homogeneous(homogeneous)[source]¶
-
Sets whether all columns of self should have the same width.
- set_column_spacing(spacing)[source]¶
- Parameters:
spacing (
int
) – the amount of space between columns, in pixels
Sets the amount of space to insert between consecutive columns.
- set_row_baseline_position(row, pos)[source]¶
- Parameters:
row (
int
) – a row indexpos (
Gtk.BaselinePosition
) – aGtkBaselinePosition
Sets how the baseline should be positioned on row of the grid, in case that row is assigned more space than is requested.
Property Details¶
- Gtk.GridLayout.props.baseline_row¶
- Name:
baseline-row
- Type:
- Default Value:
0
- Flags:
The row to align to the baseline, when
GtkWidget:valign
is set toGtk.Align.BASELINE
.
- Gtk.GridLayout.props.column_homogeneous¶
- Name:
column-homogeneous
- Type:
- Default Value:
- Flags:
Whether all the columns in the grid have the same width.
- Gtk.GridLayout.props.column_spacing¶
- Name:
column-spacing
- Type:
- Default Value:
0
- Flags:
The amount of space between to consecutive columns.
- Gtk.GridLayout.props.row_homogeneous¶
- Name:
row-homogeneous
- Type:
- Default Value:
- Flags:
Whether all the rows in the grid have the same height.
- Gtk.GridLayout.props.row_spacing¶
- Name:
row-spacing
- Type:
- Default Value:
0
- Flags:
The amount of space between to consecutive rows.