Object Hierarchy:

Object hierarchy for Grid


[ CCode ( type_id = "gtk_grid_get_type ()" ) ]
public class Grid : Widget, Accessible, Buildable, ConstraintTarget, Orientable

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

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

CSS nodes

GtkGrid uses a single CSS node with name `grid`.


GtkGrid uses the gtk_accessible_role_group role.

Namespace: Gtk
Package: gtk4



Creation methods:


Inherited Members:

All known members inherited from class Gtk.Widget
All known members inherited from interface Gtk.Orientable