PDA

View Full Version : help - fieldsets in a fieldset with column layout



dragonblk
14 May 2008, 2:28 AM
hi.

i need to align some fieldsets in a 2 column layout within a fieldset that can be collapsed by a checkbox.
i tried the following (in pseudocode):




{xtype: 'fieldset', title: 'rechte', checkboxToggle: true, autoHeight: true, autoWidth: true, collapsed: true,
defaultType: 'checkbox', layout: 'column', autoScroll: true,
items: [
{ columnWidth: 0.5,
layout: 'form',
items : [
{xtype: 'fieldset', layout: 'form', title: 'ab:', defaultType: 'checkbox', autoHeight: true, items: [
{ fieldLabel: 'check1', name: 'check1', boxLabel:'', style: 'margin-top: 5px'},
{ fieldLabel: 'check2', name: 'check2', boxLabel:'', style: 'margin-top: 5px'},

]},
{xtype: 'fieldset', layout: 'form', title: 'ad:', defaultType: 'checkbox', autoHeight: true, items: [
{ fieldLabel: 'check3', name: 'check3', boxLabel:'', style: 'margin-top: 5px'},
{ fieldLabel: 'check4', name: 'check4', boxLabel:'', style: 'margin-top: 5px'},
]},
]
},
{ columnWidth: 0.5,
layout: 'form',
items : [
{xtype: 'fieldset', layout: 'form', title: 'ab:', defaultType: 'checkbox', autoHeight: true, items: [
{ fieldLabel: 'check5', name: 'check5', boxLabel:'', style: 'margin-top: 5px'},
{ fieldLabel: 'check6', name: 'check6', boxLabel:'', style: 'margin-top: 5px'},

]},
{xtype: 'fieldset', layout: 'form', title: 'ad:', defaultType: 'checkbox', autoHeight: true, items: [
{ fieldLabel: 'check7', name: 'check7', boxLabel:'', style: 'margin-top: 5px'},
{ fieldLabel: 'check8', name: 'check8', boxLabel:'', style: 'margin-top: 5px'},
]},
]
}
]
}



unfortunately the outer fieldset display almost nothing. all content is crumbled to a few pixels size.

any ideas what did go wrong?

cheers

xmatt1
30 May 2008, 7:42 AM
for example here ts my code



var myForm = new Ext.form.FormPanel({
baseCls:'x-plain',
labelAlign:'top',
items:{
xtype:'tabpanel',
activeTab: 0,
defaults:{autoWidth:true,autoHeight:true,autoScroll:true,bodyStyle:'padding:10px'},
items:[{
title:'Data',
layout:'form',
items: [{
xtype:'fieldset',
title: 'Title 1',
collapsible:false,
defaults:{allowBlank:false, anchor:'100%'},
defaultType:'textfield',
layout:'column',
items:[{
columnWidth:.5,
layout: 'form',
items: [{
fieldLabel:'Name',
id:'myform-name',
name:'myForm_name'
},{
fieldLabel:'Address',
id:'myform-address',
name:'myForm_address'
}]
},{
columnWidth:.5,
layout:'form',
items:[{
fieldLabel:'City',
id:'myform-city',
name:'myform_city'
},{
fieldLabel:'State',
id:'myform-state',
name:'myform-state'
}]
}]
}]
}]
}
});


And the result its all blank only appear the tabpanel and fieldset the fields dosent appear
some idea??