fn add_tab_internal(&mut self, ctx: &mut Context, header_text: String, body: Entity) {
        //Create the new tab
        let header = self.create_tab_header(ctx, header_text, body);

        //Set tab body collapsed
        ctx.get_widget(body)
            .set("visibility", Visibility::Collapsed);

        //Push button to the header container
        ctx.append_child_entity_to(header, self.header_container);

        //Push the body to the body container
        ctx.append_child_entity_to(body, self.body_container);

        //Push the new tab to the list
        self.tabs.push((header, body));

        //If the added tab is the first
        if self.tabs.len() == 1 {
            //Select the tab just inserted
            self.selected = 0;
            self.refresh_selected_tab(ctx);
        }
    }
///Add a new tab to the widget. Unlike the public "add_tab", this happen immediatly.
Add a new tab to the widget. Unlike the public "add_tab", this happen immediatly.
Add a new tab to the widget . Unlike the public " add_tab " this happen immediatly .
fn add_tab_internal(&mut self, ctx: &mut Context, header_text: String, body: Entity) {
        //Create the new tab
        let header = self.create_tab_header(ctx, header_text, body);
        //Set tab body collapsed
        ctx.get_widget(body)
            .set("visibility", Visibility::Collapsed);
        //Push button to the header container
        ctx.append_child_entity_to(header, self.header_container);
        //Push the body to the body container
        ctx.append_child_entity_to(body, self.body_container);
        //Push the new tab to the list
        self.tabs.push((header, body));
        //If the added tab is the first
        if self.tabs.len() == 1 {
            //Select the tab just inserted
            self.selected = 0;
            self.refresh_selected_tab(ctx);
        }
    }
fn add_tab_internal ( & mut self , ctx : & mut Context , header_text : String , body : Entity ) { //Create the new tab let header = self . create_tab_header ( ctx , header_text , body ) ; //Set tab body collapsed ctx . get_widget ( body ) . set ( " " , Visibility :: Collapsed ) ; //Push button to the header container ctx . append_child_entity_to ( header , self . header_container ) ; //Push the body to the body container ctx . append_child_entity_to ( body , self . body_container ) ; //Push the new tab to the list self . tabs . push ( ( header , body ) ) ; //If the added tab is the first if self . tabs . len ( ) == 1 { //Select the tab just inserted self . selected = 0 ; self . refresh_selected_tab ( ctx ) ; } }
Add a new tab to the widget.
Add a new tab to the widget .
&mut self
ctx
&mut Context
header_text
String
body
Entity