PDA

View Full Version : Nesting VBox in HBox



andresblanco
29 Nov 2010, 9:49 AM
When I use the following code, the vbox doesn't render :


configurador = Ext.extend(Ext.Panel, {
layout: 'fit',
initComponent: function() {
this.items = [{
layout: 'hbox',
items: [{
layout: 'vbox',
items: [{
html: 'not showing'
}, {
html: 'not showing either'
}]
}, {
html: 'this shows'
}]
}];

configurador.superclass.initComponent.call(this, arguments);
}
});

Any idea what could be causing this behavior?

Condor
29 Nov 2010, 11:21 AM
hbox items need height or flex, vbox items need width or flex.

Your component is overnested, Why not make the panel itself layout:'hbox'?