DropDown#
- class ignis.widgets.Widget.DropDown(*args: Any, **kwargs: Any)#
Bases: Gtk.DropDown.
A widget that allows the user to choose an item from a list of options.
- Properties:
items (
list[str]
, optional, read-write): A list of strings that can be selected in the popover.on_selected (
Callable
, optional, read-write): Function to call when the user selects an item from the list.selected (
str
, not argument, read-only): The selected string. It is a shortcut forself.selected_item.props.string
.
Widget.DropDown( items=["option 1", "option 2", "option 3"], on_selected=lambda x, selected: print(selected) )