PDA

View Full Version : TabPanel Issue



Riaz
18 Oct 2010, 8:20 PM
I am working on TabPanel. I want to display title (example – xyz compaly) as well as login button on the title bar. Is it possible within the TabPanel?

evant
18 Oct 2010, 9:18 PM
Ext.setup({
onReady: function(){
var tabs = new Ext.TabPanel({
fullscreen: true,
items: [{
title: 'A'
},{
title: 'B'
}]
});

tabs.getTabBar().add([{
flex: 1
},{
xtype: 'button',
text: 'Foo'
}]);
tabs.getTabBar().doLayout();
}
});

Riaz
18 Oct 2010, 9:40 PM
Thanks for your reply. It is showing tabs('A','B') and button ('Foo'). But I need also to add label to display "xyz company". How do I do that?

Riaz
18 Oct 2010, 10:01 PM
I solved .

In the "TabPanel"


var mainTaPanel = new Ext.TabPanel({
dockedItems: [TitleBar],
:


In the Toolbar


var TitleBar = new Ext.Toolbar({
dock: 'top',
title:'xyz company',
ui:'light',
//text:'ddd'
defaults: { pack: 'center' },
items: [ { xtype: 'spacer'}, {text:'Login'}]

});