GtkGrid

A container that arranges children in rows and columns.

Preview

CSS Node Tree

grid

Props

Prop

Type

Child placement

GtkGrid reads these from each child's props, like gtk_grid_attach(), and doesn't pass them on.

Prop

Type

Behavior

  • Children fill their cells unless their halign / valign say otherwise.
  • Only columns (rows) with a child that expands (hexpand / vexpand, also when something inside it expands) take extra space, unless the grid is homogeneous.
  • Without placement props, children flow naturally.
  • Uses CSS Grid for layout.

GTK4 Documentation →

On this page