### Class

# Gtk GridLayout

#### Description [src]

    final class Gtk.GridLayout : Gtk.LayoutManager {
      /* No available fields */
    }

`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 `GtkGridLayoutChild` associated to each child widget.

The behaviour of `GtkGridLayout` when several children occupy the same grid cell is undefined.

`GtkGridLayout` can be used like a `GtkBoxLayout` 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 using `GtkBoxLayout`.

#### Hierarchy

#### Ancestors

- GtkLayoutManager
- GObject

#### Constructors

###### gtk_grid_layout_new

Creates a new `GtkGridLayout`.

#### Instance methods

###### gtk_grid_layout_get_baseline_row

Retrieves the row set with gtk_grid_layout_set_baseline_row().

###### gtk_grid_layout_get_column_homogeneous

Checks whether all columns of `grid` should have the same width.

###### gtk_grid_layout_get_column_spacing

Retrieves the spacing set with gtk_grid_layout_set_column_spacing().

###### gtk_grid_layout_get_row_baseline_position

Returns the baseline position of `row`.

###### gtk_grid_layout_get_row_homogeneous

Checks whether all rows of `grid` should have the same height.

###### gtk_grid_layout_get_row_spacing

Retrieves the spacing set with gtk_grid_layout_set_row_spacing().

###### gtk_grid_layout_set_baseline_row

Sets which row defines the global baseline for the entire grid.

###### gtk_grid_layout_set_column_homogeneous

Sets whether all columns of `grid` should have the same width.

###### gtk_grid_layout_set_column_spacing

Sets the amount of space to insert between consecutive columns.

###### gtk_grid_layout_set_row_baseline_position

Sets how the baseline should be positioned on `row` of the grid, in case that row is assigned more space than is requested.

###### gtk_grid_layout_set_row_homogeneous

Sets whether all rows of `grid` should have the same height.

###### gtk_grid_layout_set_row_spacing

Sets the amount of space to insert between consecutive rows.

##### Methods inherited from GtkLayoutManager (6)

###### gtk_layout_manager_allocate

Assigns the given `width`, `height`, and `baseline` to a `widget`, and computes the position and sizes of the children of the `widget` using the layout management policy of `manager`.

###### gtk_layout_manager_get_layout_child

Retrieves a `GtkLayoutChild` instance for the `GtkLayoutManager`, creating one if necessary.

###### gtk_layout_manager_get_request_mode

Retrieves the request mode of `manager`.

###### gtk_layout_manager_get_widget

Retrieves the `GtkWidget` using the given `GtkLayoutManager`.

###### gtk_layout_manager_layout_changed

Queues a resize on the `GtkWidget` using `manager`, if any.

###### gtk_layout_manager_measure

Measures the size of the `widget` using `manager`, for the given `orientation` and size.

#### Properties

###### Gtk.GridLayout:baseline-row

The row to align to the baseline, when `GtkWidget:valign` is set to `GTK_ALIGN_BASELINE`.

###### Gtk.GridLayout:column-homogeneous

Whether all the columns in the grid have the same width.

###### Gtk.GridLayout:column-spacing

The amount of space between to consecutive columns.

###### Gtk.GridLayout:row-homogeneous

Whether all the rows in the grid have the same height.

###### Gtk.GridLayout:row-spacing

The amount of space between to consecutive rows.

#### Class structure

    struct GtkGridLayoutClass {
      GtkLayoutManagerClass parent_class;

    }

###### Class members

`parent_class` |
    GtkLayoutManagerClass
| No description available.