PDA

View Full Version : Column Layout inside a FormPanel



ac0v
26 Mar 2010, 4:07 PM
Hi,

I've tried to build "Form 3" found here: http://www.extjs.com/deploy/dev/examples/form/dynamic.html with ExtJS Designer.

I'd like to create a column based layout inside a FormPanel and set the labelAlign: 'top' only at the top Level FormPanel.

But I'm not able to get an item without an xtype into the FormPanels items array using the Designer.

Code Snippet:


var top = new Ext.FormPanel({
...
items: [{
layout:'column',
items:[{
...
}]
}
...
});Does anybody know how to do this?

Regards,
Andreas

aconran
26 Mar 2010, 4:41 PM
Andreas -

Did you take a look at the example projects which are posted at the top of the Designer Examples forum ?
http://www.extjs.com/forum/showthread.php?t=94950

Several of these form layouts have been replicated while using updated more preferred ways to creating these types of layouts. Such as using hbox and vbox rather than column layout.

In the example that you linked, the xtype being omitted is really just a convenience. An empty xtype there is going to be interpreted as a "panel".

Animal
29 Mar 2010, 3:03 AM
This question illustrates why a WYSIWYG tool won't reduce support clamour.

You can still throw together nested Component hierarchies with incorrect or no layout configuration and hints. That column layout will not be sized by its parent.

It might slow down the rate of support calls. But only because it takes longer to actually build your UI with the designer, so it might throttle back the rate.

Jamie Avins
29 Mar 2010, 8:16 AM
Form/Anchor layouts don't currently (3.1.x) pass through sizing to subcontainers unless you specify an anchor in their configuration. This is changing in 3.2.x as a defaultAnchor is now applied if you don't specify one.