Package: gtk

Class gtk-grid

Superclasses

gtk-container, gtk-widget, g-initially-unowned, 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 value :center of the gtk-align enumeration.
Allowed values: >= 0
Default value: 0
Since 3.10
column-homogeneous
The column-homogeneous property of type :boolean (Read / Write)
If true, the columns are all the same width.
Default value: nil
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: nil
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

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

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

gtk-grid can be used like a gtk-box by just using the function gtk-container-add, 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 gtk-box is the preferred widget.

CSS nodes

gtk-grid 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

2013-12-7