ListHeader#
Added in version 4.12.
Superclasses: Object
GtkListHeader is used by list widgets to represent the headers they
display.
GtkListHeader objects are managed just like ListItem
objects via their factory, but provide a different set of properties suitable
for managing the header instead of individual items.
Methods#
- class ListHeader
- get_child() Widget | None#
Gets the child previously set via
set_child()orNoneif none was set.Added in version 4.12.
- get_end() int#
Gets the end position in the model of the section that
selfis currently the header for.If
selfis unbound,INVALID_LIST_POSITIONis returned.Added in version 4.12.
- get_item() Object | None#
Gets the model item at the start of the section. This is the item that occupies the list model at position
start.If
selfis unbound, this function returnsNone.Added in version 4.12.
- get_n_items() int#
Gets the the number of items in the section.
If
selfis unbound, 0 is returned.Added in version 4.12.
- get_start() int#
Gets the start position in the model of the section that
selfis currently the header for.If
selfis unbound,INVALID_LIST_POSITIONis returned.Added in version 4.12.
- set_child(child: Widget | None = None) None#
Sets the child to be used for this listitem.
This function is typically called by applications when setting up a header so that the widget can be reused when binding it multiple times.
Added in version 4.12.
- Parameters:
child – The list item’s child or
Noneto unset
Properties#
- class ListHeader