Object Hierarchy:

Gtk.Grid Gtk.Grid Gtk.Grid Gtk.Container Gtk.Container Gtk.Container->Gtk.Grid Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.Grid Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.Grid Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Orientable Gtk.Orientable Gtk.Orientable->Gtk.Grid


[ CCode ( type_id = "gtk_grid_get_type ()" ) ]
public class Grid : Container, Implementor, Buildable, 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. The behaviour of GtkGrid when several children occupy the same grid cell is undefined.

GtkGrid can be used like a Box by just using 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 Box is the preferred widget.

CSS nodes

GtkGrid uses a single CSS node with name grid.

Namespace: Gtk
Package: gtk+-3.0



Creation methods:


Inherited Members:

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