Hello all,
I wonder if anyone could point out what's wrong with this code. I have an existing Ext.Component instance that I want to add to a TabPanel, and I don't know how to set the title on it.
I have seen a lot of conflicting information both on these forums and on the Internet in general. I am using the most recent downloadable version of Sencha Touch.
Here is the code. It currently shows the new tab, but with a blank title. If I use either of the setText() calls, or try to call setTitle() in some way that I've seen on some other threads, the script halts execution.
newPage is a Ext.Component instance (in fact, for this particular test, it's another TabPanel instance):
Code:
var tab = tabPanel.add( newPage );
//tab.setText( title );
//newPage.setText( title );
if ( show ) {
tabPanel.setActiveItem( newPageIdx );
}
tabPanel.doLayout();
Does anyone know how I can successfully set and show the title?
Thanks!
-Nathan Morse