PDA

View Full Version : left margin of a checkbox



Bogdan0x400
28 Apr 2011, 6:36 AM
How to specify a left margin for a checkbox?

{
xtype: 'checkbox',
name: 'mycheckbox',
boxLabel: 'my checkbox',
hidden: true
}

friend
28 Apr 2011, 8:46 AM
Visit the Ext.form.Checkbox API docs (http://sl72mfgtcsys/ext-3.3.1/docs/?class=Ext.form.Checkbox) and read about the margins config option.

Note that this only applies to a container which uses a border layout or either of the hbox/vbox layouts.

Otherwise, you'll have to resort to a CSS style override for the target checkbox.

CSS Style override:


.myOverriddenCheckbox {
margin-left: 20px;
}


Add to cls config option of checkbox:



{
xtype: 'checkbox',
boxLabel: 'Czech Box',
cls: 'myOverriddenCheckbox',
hideLabel: true
}