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

Ability to give names besides "tabs" to a container which holds sub-tabs #21

Open
dspyz-matician opened this issue Aug 25, 2023 · 1 comment

Comments

@dspyz-matician
Copy link

dspyz-matician commented Aug 25, 2023

AFAICT (apologies, I'm very new to the egui ecosystem and feeling my way around and possibly missing things) if I have nested tabs eg.

let top_level_tab1: TileId = tiles.insert_tab_tile(tabs1);
let top_level_tab2: TileId = tiles.insert_tab_tile(tabs2);
let top_level_tabs = tiles.insert_tab_tile(vec![top_level_tab1, top_level_tab2])
Container::new_tabs(top_level_tabs)

There's no function to assign a name to top_level_tab1 and top_level_tab2. They're both just labelled "Tabs"

@liquidhelium
Copy link
Contributor

struct TreeBehavior {}
impl egui_tiles::Behavior<Pane> for TreeBehavior {
fn tab_title_for_pane(&mut self, pane: &Pane) -> egui::WidgetText {
format!("Pane {}", pane.nr).into()
}

Does this fit your use case?

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

No branches or pull requests

2 participants