bootstack.dialogs.FilterDialog#
- class bootstack.dialogs.FilterDialog(*, title='', items=None, enable_search=False, enable_select_all=False, parent=None)#
Bases:
objectA dialog for selecting multiple items from a list.
Displays a scrollable list of checkboxes. Optionally includes a search box that narrows visible items and a “Select All” checkbox.
- Parameters:
title (str) – Dialog window title.
items (list[str | dict[str, Any]] | None) –
Items to display. Each item is a string or a dict with keys:
text(str): Display label (required for dicts).value(Any): Value returned when selected. Defaults totext.selected(bool): Initial check state. Defaults toFalse.
enable_search (bool) – Include a search box that filters items by text. Defaults to
False.enable_select_all (bool) – Include a “Select All” checkbox. Defaults to
False.parent (Any) – Parent widget. Defaults to the active root window.
- show(*, position=None, modal=None)#
Display the dialog and block until it is closed.
- Parameters:
- Returns:
self— allows chaining –dlg = FilterDialog(...).show(); dlg.result.- Return type: