1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Seattle, WA
    Posts
    1
    Vote Rating
    0
    morsen is on a distinguished road

      0  

    Question Setting the tab title for a pre-existing Component instance

    Setting the tab title for a pre-existing Component instance


    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
    Last edited by morsen; 13 Aug 2011 at 5:31 PM. Reason: Wrap [CODE] tags

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar