GridView


Object Hierarchy:

Gtk.GridView Gtk.GridView Gtk.GridView Gtk.ListBase Gtk.ListBase Gtk.ListBase->Gtk.GridView Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.ListBase GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Gtk.Accessible Gtk.Accessible Gtk.Accessible->Gtk.GridView Gtk.Accessible->Gtk.ListBase Gtk.Accessible->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.GridView Gtk.Buildable->Gtk.ListBase Gtk.Buildable->Gtk.Widget Gtk.ConstraintTarget Gtk.ConstraintTarget Gtk.ConstraintTarget->Gtk.GridView Gtk.ConstraintTarget->Gtk.ListBase Gtk.ConstraintTarget->Gtk.Widget Gtk.Orientable Gtk.Orientable Gtk.Orientable->Gtk.GridView Gtk.Orientable->Gtk.ListBase Gtk.Scrollable Gtk.Scrollable Gtk.Scrollable->Gtk.GridView Gtk.Scrollable->Gtk.ListBase

Description:

[ CCode ( type_id = "gtk_grid_view_get_type ()" ) ]
public sealed class GridView : ListBase, Accessible, Buildable, ConstraintTarget, Orientable, Scrollable

`GtkGridView` presents a large dynamic grid of items.

`GtkGridView` 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.

`GtkGridView` 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](section-list-widget.html).

CSS nodes

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

`GtkGridView` uses a single CSS node with name `gridview`. Each child uses a single CSS node with name `child`. If the [ property@Gtk.ListItem:activatable] property is set, the corresponding row will have the `.activatable` style class. For rubberband selection, a subnode with name `rubberband` is used.

Accessibility

`GtkGridView` uses the gtk_accessible_role_grid role, and the items use the gtk_accessible_role_grid_cell role.


Namespace: Gtk
Package: gtk4

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

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