| PyGTK Tutorial | ||
|---|---|---|
| <<< Previous | Next >>> | |
The List widget is designed to act as a vertical container for widgets that should be of the type ListItem.
A List widget has its own window to receive events and its own background color which is usually white. As it is directly derived from a Container it can be treated as such, see the Container widget for more on this.
The selection list of a GtkList object
can be retrieved using the method:
selection_list = gtklist.get_selection() |
The selection_list is a list containing all list items that are currently selected.
The selection_mode of the gtklist determines the selection facilities of the gtklist and therefore the contents of the selection_list. The selection_mode may be one of the following defined in GTK.py):
SELECTION_BROWSE - The selection_list is empty if the gtklist contains no widgets or insensitive ones only, otherwise it contains exactly one list item.
SELECTION_MULTIPLE - The selection_list is empty if no list items are selected or contains the selected items.
SELECTION_EXTENDED - The selection_list is always empty.
selection_changed(gtklist, data) |
This signal will be invoked whenever the
selection_list
of a gtklist has changed.
This happens when a child of the gtklist
got selected or deselected.
select_child(gtklist, child, data) |
This signal is invoked when a child of
the gtklist is about to get
selected. This happens mainly on calls to select_item(),
select_child(),
button presses and sometimes indirectly triggered on some other occasions
when children get added to or removed from the gtklist.
unselect_child(gtklist, child, data) |
This signal is invoked when a child of the gtklist is about to get deselected. This happens mainly on calls to unselect_item(), unselect_child(), button presses and sometimes indirectly triggered on some other occasions when children get added to or removed from the gtklist.
| <<< Previous | Home | Next >>> |
| Code Examples | Methods |