PDA

View Full Version : Padding is not getting applied for radiogroup



girish.arjunagi
22 Nov 2012, 4:12 AM
Padding is not getting applied to the radiogroup element.

suzuki1100nz
22 Nov 2012, 11:56 PM
Your going to have to provide more than that if you want some help.

girish.arjunagi
23 Nov 2012, 1:02 AM
Ext.create('Ext.form.Panel', {
title: 'RadioGroup Example',
width: 300,
height: 125,
bodyPadding: 10,
renderTo: Ext.getBody(),
items:[{
xtype: 'radiogroup',
fieldLabel: 'Two Columns',
padding : '0 0 0 50',
// Arrange radio buttons into two columns, distributed vertically
columns: 2,
vertical: true,
items: [
{ boxLabel: 'Item 1', name: 'rb', inputValue: '1' },
{ boxLabel: 'Item 2', name: 'rb', inputValue: '2', checked: true},
{ boxLabel: 'Item 3', name: 'rb', inputValue: '3' },
{ boxLabel: 'Item 4', name: 'rb', inputValue: '4' },
{ boxLabel: 'Item 5', name: 'rb', inputValue: '5' },
{ boxLabel: 'Item 6', name: 'rb', inputValue: '6' }
]
}]
});

In the above code i am setting the left padding of 50px to radiogroup. But i dont actually see the effect of padding on radiogroup element. Padding config is documented for the xtype radiogroup.

suzuki1100nz
23 Nov 2012, 10:50 AM
Hi,
Your correct, padding config isn't working on a radio group.
Try margin - that works.
Also better approach is to apply a css class to cls and style that.

girish.arjunagi
23 Nov 2012, 10:57 PM
Thank you suzuki1100nz, margin worked!!!!