-
25 Apr 2012 12:20 PM #1
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>' } ] } } ] } });
-
25 Apr 2012 3:41 PM #2
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>' } ] } ] } });
-
26 Apr 2012 7:16 AM #3
Thanks that worked great! No I know to not use the config attribute for objects not created with Ext.define.


Reply With Quote