View Full Version : How to get Title Text of Active Tab

Anup Rana
14 Jun 2011, 1:34 AM
Hii ,
I am using 2 tab panels in my form ....i want to get the Title text of the active tab ....can u help
me out were i m wrong i m using .... Ext.getCmp('TabPanel').getActiveTab().getText();

14 Jun 2011, 2:54 AM
Assuming 'TabPanel' is the id you've assigned your Ext.TabPanel:

var title = Ext.getCmp('TabPanel').getActiveTab().title;
// Note: Make sure you use the setTitle() method if you want to update it.