PDA

View Full Version : column layout alignment problem



ragendu
1 May 2013, 11:32 PM
Hi All,
I have a panel with column layout with comboboxes and button. The first combobox has a button beside it. I want the remaining comboboxes that are below the first combobox to expand their width so that it extends till the button in the first row(means all the combo boxes except first should have width = cb1+btn1). Any help is appreciated.
testPanel = new Ext.Panel({
width: 430,


items: [
{
layout:'column',
items:[
{
columnWidth:'.9' ,
layout: 'form',
items: [
{
xtype:'combo',
id: 'cb1',
width: 200,
listWidth: 200,
labelStyle: 'width:150px',
fieldLabel: 'Combo1',
},
{
xtype:'combo',
id: 'cb2',
width: 200,
listWidth: 200,
labelStyle: 'width:150px',
fieldLabel: 'Combo2',
},
{
xtype:'combo',
id: 'cb3',
width: 200,
listWidth: 200,
labelStyle: 'width:150px',
fieldLabel: 'Combo3',
}
]
},
{
columnWidth:.1,
layout: 'form',
items: [{
xtype: 'button',
align:'right',
id:'btn1',
text: 'Click'
}]
}
]
}
]


});

Thanks in advance

slemmon
3 May 2013, 12:06 PM
So, you're wanting all of the comboboxes to be the width of the parent container except the top combo since it has a button to the right of it? Is that correct?