I would like to have some padding between my components. Currently my form looks like this :

If I want to have 5 pixel spacing between all my components is there an easy way to do this? If I put margin and padding values at the panel level, then this affects only the panel itself, rather than its containing elements :
margin: '5 5 5 5',
padding: '15',
xtype:'panel',
layout: {
type: 'table',
columns: 3
},
items: [
{
xtype:'label',
text:'Name *'
},{
xtype:'label',
text:'Version *'
}, {
xtype:'label',
text:'Sprache *'
}, {
xtype:'textfield',
text:'Name *'
}, {
xtype: 'textfield',
text: 'Version *'
}, {
xtype: 'combobox',
text: 'Sprache *'
}
]
I could put padding for each individual component but that seems like a pain.
Ah just figured it out with some moore googling. You need to set style padding on the tdAttrs value for the layout.
layout: {
type: 'table',
columns: 3,
tdAttrs: { style: 'padding: 10px;' }
// padding: '65'
},
Anyone know of a better solution?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With