PDA

View Full Version : height attribute to fieldset



KSagar
9 Feb 2010, 5:51 AM
I am working on applying hbox layout to a form.

My code is snippet is as,



.
.
.
.
layout: 'fit',
items:[
{
frame:false,
checkboxToggle:false,
xtype:'fieldset',
layout: {
type: 'vbox',
align: 'stretch' // Child items are stretched to full width
},
height: 100, <-- Need to specify height
items:[
{
xtype:'textfield',
fieldLabel: 'Code',
},{
xtype:'textfield',
fieldLabel: 'Name',
}]
}]


In the 'fieldset' item, i need to specify height(Image 1) and I dont want that. I want it to take height as per number of fields.
When doest specify height attribute, it shows form like shown in Image 2.
When I specify height as 'autoHeight: true', it doesnt show any fields on the page. (Image 3)

Please help.

Animal
9 Feb 2010, 6:28 AM
You have it in a layout: 'fit' Container!

Most of the time, that is redundant.

So what are you actually wanting?

KSagar
9 Feb 2010, 6:34 AM
I am expecting 'fieldset' to take height as per the items. I dont want to specify hardcoded height value. do I need to remote layout: 'fit'?

Animal
9 Feb 2010, 8:31 AM
What do you think, having read what layout:'fit' does?