PDA

View Full Version : Get position of a the activeTab



Foggy
31 Aug 2007, 7:36 AM
Hi there

I have just another problem with Ext :(
I have a south panel, first this south panel contains a ordinary panel with simple html text.
If i choose a row in the center grid panel, i remove the items in the south panel and render a new TabPanel into the south panel. So if there was a TabPanel before, i would like to get the active panels position/index to activate the same panel on new render.
Heres my actually code:

if (!this.detailPanel.getActiveTab) {
var activeTab = 0;

} else {
var activeTab = this.detailPanel.getActiveTab();
alert(activeTab.index);
}
//var activeTab = 0;

this.detailPanel = new Ext.TabPanel({
border:true,
activeTab: activeTab,
tabPosition:'top',
baseCls:'x-plain',
viewConfig: {
forceFit:true
},
items:[
detail,
receipt,
debit
]
});

I can get the active tab object, but not their position.

Thanks for help in advance and greets
Claudio

fay
31 Aug 2007, 7:49 AM
See: http://extjs.com/forum/showthread.php?p=34433#post34433

Foggy
31 Aug 2007, 9:02 AM
Exactly, thank you very much, fay :)

Greets Claudio