Package: gtk

Class gtk-grid

Superclasses

gtk-container, gtk-widget, gtk-buildable, gtk-orientable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

baseline-row
The baseline-row property of type :int (Read / Write)
The row to align to the baseline when valign has the :center value of the gtk-align enumeration.
Allowed values: >= 0
Default value: 0
column-homogeneous
The column-homogeneous property of type :boolean (Read / Write)
If true, the columns are all the same width.
Default value: false
column-spacing
The column-spacing property of type :int (Read / Write)
The amount of space between two consecutive columns.
Allowed values: [0, 32767]
Default value: 0
row-homogeneous
The row-homogeneous property of type :boolean (Read / Write)
If true, the rows are all the same height.
Default value: false
row-spacing
The row-spacing property of type :int (Read / Write)
The amount of space between two consecutive rows.
Allowed values: [0, 32767]
Default value: 0

Details

The gtk-grid widget is a container which arranges its child widgets in rows and columns, with arbitrary positions and horizontal/vertical spans.

Children are added using the gtk-grid-attach function. They can span multiple rows or columns. It is also possible to add a child next to an existing child, using the gtk-grid-attach-next-to function. The behaviour of the gtk-grid widget when several children occupy the same grid cell is undefined.

The gtk-grid widget can be used like a gtk-box widget by just using the gtk-container-add function, which will place children next to each other in the direction determined by the orientation property. However, if all you want is a single row or column, then the gtk-box widget is the preferred widget.

CSS nodes

The gtk-grid implementation uses a single CSS node with name grid.

Child Property Details

height
The code height child property of type :int (Read / Write)
The number of rows that a child spans.
Allowed values: >= 1
Default value: 1
left-attach
The left-attach child property of type :int (Read / Write)
The column number to attach the left side of the child to.
Default value: 0
top-attach
The top-attach child property of type :int (Read / Write)
The row number to attach the top side of a child widget to.
Default value: 0
width
The width child property of type :int (Read / Write)
The number of columns that a child spans.
Allowed values: >= 1
Default value: 1
 

Slot Access Functions

Inherited Slot Access Functions

See also

*2021-10-30