Skip to content

Rename Tabs #135

Answered by lvaroqui
efendioglukdz asked this question in Q&A
Jun 1, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Something like this:

struct FileTab {
    title: String,
    content: String,
}

impl egui_dock::TabViewer for TabViewer {
    type Tab = FileTab;

    fn ui(&mut self, ui: &mut egui::Ui, tab: &mut Self::Tab) {
        egui::TextEdit::multiline(&mut self.content);
    }

    fn title(&mut self, tab: &mut Self::Tab) -> egui::WidgetText {
        self.title.into()
    }
}

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@efendioglukdz
Comment options

@lvaroqui
Comment options

@lvaroqui
Comment options

Answer selected by Adanos020
@Adanos020
Comment options

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