PDA

View Full Version : layout:'fit' issues in form panel



coooolmagic
10 Nov 2010, 6:22 AM
hi all

i am using layout:'fit' for my form panel.
it is taking care of width but not the length.

it doesn't display all the fields the form has.

anything am i missing here?

plalx
10 Nov 2010, 6:44 AM
It's not the right layout, 'fit' layout is for when you want to fit a single child in it's container. E.g. If you want a Ext.FormPanel to fit an Ext.Window, you would use layout: 'fit' on the Ext.Window. If you don't explicitely provide a layout config to the Ext.FormPanel, it will use the FormLayout (http://dev.sencha.com/deploy/dev/docs/?class=Ext.layout.FormLayout) and that's probably the one you want to use.

Condor
10 Nov 2010, 7:00 AM
The default layout:'form' of a FormPanel can also take care of the width when your fields have an 'anchor' config option, e.g. anchor:'100%'.

coooolmagic
10 Nov 2010, 9:39 AM
thank you!