GtkGridView

gtk.grid_view.GridView presents a large dynamic grid of items.

gtk.grid_view.GridView uses its factory to generate one child widget for each visible item and shows them in a grid. The orientation of the grid view determines if the grid reflows vertically or horizontally.

gtk.grid_view.GridView allows the user to select items according to the selection characteristics of the model. For models that allow multiple selected items, it is possible to turn on _rubberband selection_, using property@Gtk.GridView:enable-rubberband.

To learn more about the list widget framework, see the overview.

CSS nodes

gridview
├── child[.activatable]
│
├── child[.activatable]
│
┊
╰── [rubberband]

gtk.grid_view.GridView uses a single CSS node with name gridview. Each child uses a single CSS node with name child. If the gtk.list_item.ListItem.gboolean property is set, the corresponding row will have the .activatable style class. For rubberband selection, a subnode with name rubberband is used.

Accessibility

gtk.grid_view.GridView uses the gtk.types.AccessibleRole.Grid role, and the items use the gtk.types.AccessibleRole.GridCell role.

struct GtkGridView