forms::combo_box
Structs
ComboBox
A text-filtered list control for selecting one item, with optional "new item" behavior.
Properties
text
Type: Property<String>
Text currently shown in the input.
selected
Type: Property<Option<usize>>
Selected option index, or None when there is no valid selection.
options
Type: Property<Vec<String>>
Available option labels.
new_item
Behavior when the typed text does not match any option.
background
Textbox/list background color.
stroke
Textbox/list stroke.
style
Text style for the textbox and list items.
corner_radius
Type: Property<f64>
Textbox corner radius, in pixels.
Enums
NewItem
Behavior when typed combo-box text does not match an existing option.
Variants
Disallow
Show "No items found" and do not allow adding a new item.
AllowInvalid
Allows invalid text in the text box on commit, setting selected to None.
Text(String)
Shows custom text when there are no matches; clicking it triggers the @new_item event.