1. #1
    Sencha User
    Join Date
    Oct 2007
    Posts
    112
    Vote Rating
    0
    elDub is on a distinguished road

      0  

    Default child = new Ext.Panel({ renderTo: parent.body.id }) vs parent.add(child)

    child = new Ext.Panel({ renderTo: parent.body.id }) vs parent.add(child)


    Is there a required sequence of events that determines which way you must add a child panel to a parent panel (container)? The documentation states that there is a Panel.add() method, but in the case below it doesn't seem to render the card layout widget. I can make the below code work by adding a renderTo: body.body.id attribute to the card's initialization parameters, but things must be different when I'm adding the child to a TabPanel parent.

    Code:
    body = new Ext.Panel({region: 'center', id: 'center', margins: '5 5 5 5', bodyStyle: 'padding: 5px;'})
    view = new Ext.Viewport({id: 'viewport', layout: 'border', items: [body]})
    card = new Ext.Panel({
      id: 'cardLayout',
      title: 'Card Layout',
      layout: 'card',
      activeItem: 0,
      items: [
        {
          id: 'card1',
          html: '<div>Card 1</div>'
        },{
          id: 'card2',
          html: '<div>Card 2</div>'
        }
      ]
    });
    body.add(card);

  2. #2
    Ext User santosh.rajan's Avatar
    Join Date
    Sep 2007
    Location
    Kannur, Kerala, India
    Posts
    611
    Vote Rating
    0
    santosh.rajan is on a distinguished road

      0  

    Default


    you have to call doLayout() when you "add"
    body.add(...);
    body.doLayout();

  3. #3
    Sencha User
    Join Date
    Oct 2007
    Posts
    112
    Vote Rating
    0
    elDub is on a distinguished road

      0  

    Default


    Ummm... that was so easy, I'm embarrassed.

    This seems to make sense so that multiple children could be added to the parent object without incurring multiple layout redraws.

Thread Participants: 1

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