Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComboBox layout issue #1848

Closed
andreakarasho opened this issue Jul 24, 2022 · 3 comments
Closed

ComboBox layout issue #1848

andreakarasho opened this issue Jul 24, 2022 · 3 comments
Labels
bug Something is broken

Comments

@andreakarasho
Copy link

ComboBox doesn't respect the parent layout:

ui.vertical_centered(|ui| {    
    egui::ComboBox::from_label("Take your pick")
        .selected_text(format!("{:?}", self.radio))
        .show_ui(ui, |ui| {
            ui.selectable_value(&mut self.radio, Enum::First, "First");
            ui.selectable_value(&mut self.radio, Enum::Second, "Second");
            ui.selectable_value(&mut self.radio, Enum::Third, "Third");
        });
});

image

@andreakarasho andreakarasho added the bug Something is broken label Jul 24, 2022
@emilk
Copy link
Owner

emilk commented Jul 24, 2022

This is intentional. You can always put your own label wherever you want it

@emilk emilk closed this as completed Jul 24, 2022
@andreakarasho
Copy link
Author

The problem is about the whole widget which i'd like to put in a specific layout.
Am I missing anything?

@emilk
Copy link
Owner

emilk commented Jul 25, 2022

Oh I see, my mistake.

Yeah, only atomic widgets can successfully be put into layouts. It's a similar problem for sliders. This cannot be solved until #843

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants