Filling of elements in the table is required

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

enter image description here

If I want to have 5px spacing between all my components, is there an easy way to do this? If I put the margin and padding values ​​at the panel level, it only affects the panel itself, not 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 add paddings for each individual component, but that seems like a pain.

+3


source to share


1 answer


And just figured out with some kind of garbage Google. You need to style the padding for the tdAttrs value for the layout.

                    layout: {
                        type: 'table',
                        columns: 3,
                        tdAttrs: { style: 'padding: 10px;' }
//                        padding: '65'
                    },

      



Does anyone know of a better solution?

+2


source







All Articles