widget_dropdown
The rows a dropdown reads: what it offers, how tall its list grows and what shuts it.
On this page
ui · 5 properties · UI
The rows a dropdown reads: what it offers, how tall its list grows and what shuts it.
In a scene, widget_dropdown is the node key that applies it. A script reaches each property below as a field on node.widget_dropdown: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.widget_dropdown.get() and node.widget_dropdown.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
close_on |
enum | click |
What shuts a dropdown's list: any click, a pick included, a click outside it, or nothing but Escape One of click_outside, click, never. |
list_height |
float | 0 |
The tallest a dropdown's list grows before it scrolls, in design pixels; 0 takes egui's At least 0. |
on_closed |
string | — | Script method called when a dropdown's list goes away, on this node or the nearest ancestor whose script declares it |
on_opened |
string | — | Script method called when a dropdown's list comes up, on this node or the nearest ancestor whose script declares it |
options |
list | [] |
The words a dropdown offers; text is the one picked, and on_change hears every pick |