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

The enabled/disabled state of the ui does not propagate to the widgets inside the tabs #154

Open
stfnp opened this issue Aug 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@stfnp
Copy link

stfnp commented Aug 11, 2023

Disclaimer: I'm not entirely sure if this is a bug or actually the desired behaviour.

I was looking for a way to disable the entire ui, including all tabs and their contents. So I tried setting the ui to disabled before passing it to the DockArea:

    CentralPanel::default()
        .show(ctx, |ui| {
            // Set disabled
            ui.set_enabled(false);
        
            // Show dock area
            DockArea::new(&mut self.tree)
                .show_inside(ui, &mut self.context);
        });

This causes all tabs inside the dock area to be disabled, as expected. But any content of the tabs, like buttons, sliders, etc. still stays interactive. In egui itself the enabled/disabled state seems to propagate down to any sub-ui, so it might be consistent for egui_dock to also behave like this.

@stfnp stfnp added the bug Something isn't working label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant