ListBox


Object Hierarchy:

Gtk.ListBox Gtk.ListBox Gtk.ListBox Gtk.Container Gtk.Container Gtk.Container->Gtk.ListBox 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.ListBox Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.ListBox Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget

Description:

[ CCode ( type_id = "gtk_list_box_get_type ()" ) ]
public class ListBox : Container, Implementor, Buildable

A GtkListBox is a vertical container that contains GtkListBoxRow children.

These rows can be dynamically sorted and filtered, and headers can be added dynamically depending on the row content. It also allows keyboard and mouse navigation and selection like a typical list.

Using GtkListBox is often an alternative to TreeView, especially when the list contents has a more complicated layout than what is allowed by a CellRenderer, or when the contents is interactive (i.e. has a button in it).

Although a ListBox must have only ListBoxRow children you can add any kind of widget to it via add, and a ListBoxRow widget will automatically be inserted between the list and the widget.

ListBoxRows can be marked as activatable or selectable. If a row is activatable, row_activated will be emitted for it when the user tries to activate it. If it is selectable, the row will be marked as selected when the user tries to select it.

The GtkListBox widget was added in GTK+ 3.10.

GtkListBox as GtkBuildable

The GtkListBox implementation of the Buildable interface supports setting a child as the placeholder by specifying “placeholder” as the “type” attribute of a `<child>` element. See set_placeholder for info.

CSS nodes

list
╰── row[.activatable]
istBox uses a single CSS node named list. Each GtkListBoxRow uses a single CSS node named row. The row nodes get the .activatable style class added when appropriate.

GtkListBox


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

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



2022 vala-language.org