Skip to main content

Module select

Module select 

Source
Available on crate feature select only.
Expand description

A dropdown for choosing one value from a list.

The select opens and closes its own list, so the app only handles the chosen value. The list floats on the shared anchored layer in the menu look, with a check mark on the selected option. Escape or a click outside closes it.

An enabled select takes keyboard focus from iced’s focus operations, such as a dialog’s Tab order, and rings while focused. Space, Enter or ArrowDown then opens the list with the selected option highlighted. In the open list the arrow keys, Home and End move the highlight, and Space or Enter chooses it and closes the list.

Structs§

Select
A select builder. Convert it into an Element to render.

Enums§

Action
What a select keyboard shortcut does.

Constants§

HEIGHT
Height of the closed select in logical pixels.

Functions§

default_keymap
The default select shortcuts:
option_style
An option row: the shared menu row, highlighted while hovered or pressed.
select
Creates a select over options, showing selected when it is set. Options are labelled with their Display text.
style
The iced pick list style for a status.