1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    24
    Vote Rating
    1
    rvelasquez is on a distinguished road

      0  

    Default Simple Layout not Working

    Simple Layout not Working


    Hi,

    I'm trying to nest an hbox inside a vbox. Seems fairly straightforward but I can't get the layout to display the two pieces of text. I can see the titlebar though.

    Code:
    Ext.define("senchatest.view.Main", {
        extend: 'Ext.Container',
        xtype: 'mainview',
        
        config: {
            layout: {
                type: 'vbox',
            },
            items: [
                {
                    xtype: 'titlebar',
                    title: 'Title',
                    docked: 'top'
                },
                {
                    xtype: 'container',
                    config: {
                        layout: {
                            type: 'hbox'
                        },
                        items: [
                            {
                                html: '<p>Content 1</p>'
                            },
                            {
                                html: '<p>Content 2</p>'
                            }
                        ]
                    }
                }
            ]
        }
    });

  2. #2
    Sencha User wilzdezign's Avatar
    Join Date
    Jul 2011
    Location
    WA
    Posts
    65
    Vote Rating
    0
    wilzdezign is on a distinguished road

      0  

    Default


    I do not think you need the nested config, as that is used as part of the initial Ext.define()
    Does this work:
    Code:
    Ext.define("senchatest.view.Main", {
        extend: 'Ext.Container',
        xtype: 'mainview',
        
        config: {
            layout: {
                type: 'vbox',
            },
            items: [
                {
                    xtype: 'titlebar',
                    title: 'Title',
                    docked: 'top'
                },
                {
                    xtype: 'container',
                    layout:  'hbox',
                    items: [
                            {
                                html: '<p>Content 1</p>'
                            },
                            {
                                html: '<p>Content 2</p>'
                            }
                     ]
                }
            ]
        }
    });

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    24
    Vote Rating
    1
    rvelasquez is on a distinguished road

      0  

    Default


    Thanks that worked great! No I know to not use the config attribute for objects not created with Ext.define.

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