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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi