PDA

View Full Version : [2.2] Get SortNumber of a tab in a tabPanel



axelaxel
29 Apr 2009, 6:49 AM
hi guys
a question for you!

i have a tabpanel with some tabs.
i can have the active tab qwith this command

Ext.getCmp('category-tab-panel').getActiveTab();

but my question is

How can i know the sorting number of the tabs, i mean the position of the activ tab, between all the tabs.
thank you a lot


alessandro

Condor
29 Apr 2009, 6:52 AM
Use:

var tabpanel = Ext.getCmp('category-tab-panel');
var tab = tabpanel.getActiveTab();
var index = tabpanel.items.indexOf(tab);

axelaxel
29 Apr 2009, 6:53 AM
dank je wel!!