Skip to main content

select_with

Function select_with 

Source
pub fn select_with(
    ui: &mut Ui<'_>,
    label: &str,
    items: &[MenuItem],
    current: Option<usize>,
    spec: NodeSpec,
    text: TextStyle,
) -> Key
Expand description

select_items with its spec and text style in the caller’s hands — a compact field in a dense panel — the way button_with takes the button’s. The border, the click, the role and the disclosure are added here whatever spec said.

A current that names no option (past the end, or a separator) is none, with a select-current-ignored warning on the field: the field is described by nothing and no row is checked.