PDA

View Full Version : How to add Spacer to a fieldset



dev_java
7 Sep 2010, 5:10 AM
Hi ,

I want to get spacing between the components placed in a fieldset. I have used xtype:'spacer' . but Still i am not getting the spacer.

In the fieldset is of 'column' layout which contains label, textfield and two buttons. I need to have spacing between the text field and buttons too.

Code:


{
xtype: 'fieldset',
layout:'column',
width:'90%',
border:true,
items:[
{
xtype: 'label',
columnWidth: .30,
text:'Value Types: '
},
{
xtype: 'textfield',
id:'valueType',
columnWidth: .50,
width:200
},
{

xtype: 'button',
columnWidth: .05,
iconCls:'icon-type'

},

{
xtype:'spacer',
width:5
},
{
xtype: 'button',
columnWidth: .05,
iconCls:'icon-value'
}
]
}


Thank you

Condor
7 Sep 2010, 5:42 AM
You could try:

autoEl: {cn: ' '}

ps. If you would use a hbox layout instead of column then you could have specified margins.

dev_java
7 Sep 2010, 8:52 PM
Thanks Condor