The View

The View is the widget that displays the model data and allows the user to interact with it. The View can show all of the model's columns, or just some, and it can show them in various ways.

An important requirement for views (especially views of long lists) is that they need to know which items are not visible so they can be recycled. Views achieve that by implementing the Scrollable interface and expecting to be placed directly into a ScrolledWindow.

There are different view widgets to choose from.

ListView

ListView visar en 1-dimensionell lista med en kolumn.

Referens

Exempel

ListView

Källkod

GridView

GridView visar ett 2-dimensionellt rutnät.

Referens

Exempel

GridView

Källkod

ColumnView

ColumnView visar en 1-dimensionell lista med en eller flera kolumner.

Referens

Exempel

ColumnView

Källkod