bootstack.ask_item#

bootstack.ask_item(prompt, options, *, title='', value=None, parent=None)#

Show a dropdown-selection dialog.

Parameters:
  • prompt (str) – Prompt text displayed above the dropdown.

  • options (list[str]) – List of selectable items.

  • title (str) – Dialog window title.

  • value (str | None) – Pre-selected initial item.

  • parent (Any) – Parent widget. Defaults to the active root window.

Returns:

The selected item string, or None if canceled.

Return type:

str | None