Function dotrix_egui::combo_box_with_label[][src]

pub fn combo_box_with_label<R>(
    ui: &mut Ui,
    label: impl Into<Label>,
    selected: impl ToString,
    menu_contents: impl FnOnce(&mut Ui) -> R
) -> InnerResponse<Option<R>>
👎 Deprecated:

Use egui::ComboBox::from_label instead

Expand description

A drop-down selection menu with a descriptive label.

Deprecated! Use ComboBox instead!

Returns InnerResponse { inner: None } if the combo box is closed.

egui::combo_box_with_label(ui, "Select one!", format!("{:?}", selected), |ui| {
    ui.selectable_value(&mut selected, Enum::First, "First");
    ui.selectable_value(&mut selected, Enum::Second, "Second");
    ui.selectable_value(&mut selected, Enum::Third, "Third");
});