View Full Version : How to change a tab's title

robert patterson
5 Mar 2010, 10:09 AM
I an able to change the title of a tab with the code below but it does not show on screen. I can see the change in the Firefox debugger. What do I need to do to get the change to show? doLayout() seems to have no effect.

var tab = TT.scalesTabs.getActiveTab();
tab.title = 'Very NEW';

5 Mar 2010, 10:16 AM
Did you try use setTitle function?

( String title, [String iconCls] ) : void

title is config options and isnt public prolly

5 Mar 2010, 10:34 AM
@Robert --

tabs.activeTab.setTitle('Something new');

(assuming the active Tab is a Panel or descendant class)

Review the API Docs for Ext.Panel for more details.

robert patterson
5 Mar 2010, 12:55 PM
tabs.activeTab.setTitle('Something new');

That did it.

Thanks very much.