Skip to content

Popups in popups #4463

Answered by YgorSouza
BennD asked this question in Q&A
May 5, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

It is intentional, or at least it is documented.

One workaround is to use a Window:

struct MyApp {
    name: String,
    age: u32,
}

impl Default for MyApp {
    fn default() -> Self {
        Self {
            name: "Arthur".to_owned(),
            age: 42,
        }
    }
}

impl eframe::App for MyApp {
    fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
        egui::CentralPanel::default().show(ctx, |ui| {
            let clicked = ui
                .horizontal(|ui| {
                    ui.label(format!("{}, {}", self.name, self.age));
                    ui.button("Edit").clicked()
                })
                .inner;
            let editing: bool = …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@BennD
Comment options

@BennD
Comment options

Answer selected by BennD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants