SearchWidget
- class omni.kit.widget.searchable_combobox.search_widget.SearchWidget(theme: str, icon_path: str, modified_fn: Optional[callable] = None)
Bases:
object
A widget that provides a searchable combobox with customizable styles.
- Parameters
theme (str) – The theme to apply to the combobox.
icon_path (str) – Path to the directory containing the icons.
modified_fn (callable, optional) – Function to call when search input is modified.
Methods
__init__
(theme, icon_path[, modified_fn])A widget that provides a searchable combobox with customizable styles.
build_ui
(width, search_size)Build UI for SearchWidget.
build_ui_popup
(search_size, default_value, ...)Builds Combobox like widget when 'open' button is clicked.
clean
()Cleans up the SearchWidget and destroys models.
destroy
()Destroys the SearchWidget widget.
focus
()Focus caret on search string.
get_text
()Gets selected item in items list.
set_placeholder_text
(msg)Sets string when search field is empty.
set_text
(new_text)Sets selected item in items list.
update
(string)Update search string.
- __init__(theme: str, icon_path: str, modified_fn: Optional[callable] = None)
A widget that provides a searchable combobox with customizable styles.
- Parameters
theme (str) – The theme to apply to the combobox.
icon_path (str) – Path to the directory containing the icons.
modified_fn (callable, optional) – Function to call when search input is modified.
- build_ui(width, search_size)
Build UI for SearchWidget.
- build_ui_popup(search_size: float, default_value: str, popup_text: str, index: int, update_fn: callable)
Builds Combobox like widget when ‘open’ button is clicked.
- clean()
Cleans up the SearchWidget and destroys models.
- destroy()
Destroys the SearchWidget widget.
- focus()
Focus caret on search string.
- get_text()
Gets selected item in items list.
- set_placeholder_text(msg: str)
Sets string when search field is empty.
- set_text(new_text: str)
Sets selected item in items list.
- update(string)
Update search string.