:right-sidebar: True ListBase =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: ListBase(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Subclasses: :class:`~gi.repository.Gtk.GridView`, :class:`~gi.repository.Gtk.ListView` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.Orientable`, :class:`~gi.repository.Gtk.Scrollable` ``GtkListBase`` is the abstract base class for GTK's list widgets. Shortcuts and Gestures -------------------------------------------------------------------------------- ``GtkListBase`` supports the following keyboard shortcuts: - :kbd:`Ctrl`\+:kbd:`A` or :kbd:`Ctrl`\+wzxhzdk:0 selects all items. - :kbd:`Ctrl`\+:kbd:`Shift`\+:kbd:`A` or :kbd:`Ctrl`\+wzxhzdk:1 unselects all items. The focused item is controlled by the navigation keys below, combined with the :kbd:`Ctrl` modifier to prevent moving the selection, and the :kbd:`Shift` modifier to extend the current selection. - :kbd:`←`\, :kbd:`→`\, :kbd:`↑`\, :kbd:`↓` move the focus on the next item in the designed direction. - :kbd:`Home` and :kbd:`End` focus the first or last item. - :kbd:`PgUp` and :kbd:`PgDn` move the focus one page up or down. List item widgets support the following keyboard shortcuts: - :kbd:`Enter` activates the item. - selects the item, with the same :kbd:`Ctrl` and :kbd:`Shift` modifiers combinations as the navigation keys. Actions -------------------------------------------------------------------------------- ``GtkListBase`` defines a set of built-in actions: - ``list.scroll-to-item`` moves the visible area to the item at given position with the minimum amount of scrolling required. If the item is already visible, nothing happens. - ``list.select-item`` changes the selection. - ``list.select-all`` selects all items in the model, if the selection model supports it. - ``list.unselect-all`` unselects all items in the model, if the selection model supports it. List item widgets install the following actions: - ``listitem.select`` changes selection if the item is selectable. - ``listitem.scroll-to`` moves the visible area of the list to this item with the minimum amount of scrolling required. Properties ---------- .. rst-class:: interim-class .. class:: ListBase :no-index: .. attribute:: props.orientation :type: ~gi.repository.Gtk.Orientation The type of the None singleton.