mikeb
mikeb

Reputation: 727

Add a toolbar in a tabpanel extjs4.2

I created a tab panel that has three tabs A,B and C. Now i'm trying to add a toolbar with a save button beneath these tabs in such a form: enter image description here

Any help on doing so?

This is my code:

tabPanel = Ext.create('Ext.tab.Panel', {
    region: 'center',
    activeTab: 0,
    autoScroll: true,
    items: [
            {   
                id:"panel_A",
                title: "${tr.A}",
                html: "<iframe src= '"+A_url +"' width='100%' height='100%' id='frm_A' name='frm_A' frameborder=0 />",
            },{
                id:"panel_B",
                title: "${tr.B}",
                disabled:tabs_status,
                html: "<iframe src=''  width='100%' height='100%' id='frm_B' name='frm_B' frameborder=0 />",
            },{
                id:"panel_C",
                title: "${tr.C}",
                disabled:tabs_status,
                html: "<iframe src= '' width='100%' height='100%' id='frm_C' name='frm_C' frameborder=0 />",
            }]
    });


viewport = new Ext.Viewport({
    layout:'border',
    items:[tabPanel]
});

Upvotes: 0

Views: 133

Answers (1)

CD..
CD..

Reputation: 74126

You can use tbar:

Convenience config. Short for 'Top Bar'.

tbar: [
  { xtype: 'button', text: 'Save' }
]

Example: https://fiddle.sencha.com/#fiddle/13rh

Upvotes: 2

Related Questions