Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to give padding/margin to items inside the ExtJS panel

I am using ExtJS 2.3.0

I have a panel and some items inside that

{
    xtype: 'panel',
    border: false,
    margin: '10px;' // Not working for me
    items: [
            { boxLabel: 'One', xtype: 'checkbox' },
            { boxLabel: 'Two', xtype: 'checkbox' }
    ]
}

I tried using margin, padding... none of them is working for me..

Any solutions.

like image 337
Microsoft DN Avatar asked Jan 22 '14 07:01

Microsoft DN


1 Answers

You could use the bodyStyle configuration property:

{
    xtype: 'panel',
    border: false,
    bodyStyle: 'margin: 10px;'
    items: [
        { boxLabel: 'One', xtype: 'checkbox' },
        { boxLabel: 'Two', xtype: 'checkbox' }
    ]
}
like image 72
matt Avatar answered Nov 15 '22 11:11

matt