0

谁能告诉如何在 extjs4.1 中水平对齐组合框

例如

组合1 组合2 组合3

组合4 组合5 组合6

谢谢

4

1 回答 1

2

您可以使用Hbox布局来实现这一点:

Ext.create('Ext.form.Panel', {
    items: [{
        xtype: 'container',
        layout: 'hbox',
        defaults: {
            flex: 1
        },
        items: [{
            xtype: 'combobox'
        }, {
            xtype: 'combobox'
        }, {
            xtype: 'combobox'
        }]
    }, {
        xtype: 'container',
        layout: 'hbox',
        defaults: {
            flex: 1
        },
        items: [{
            xtype: 'combobox'
        }, {
            xtype: 'combobox'
        }, {
            xtype: 'combobox'
        }]
    }],
    renderTo: Ext.getBody()
});

http://plnkr.co/edit/N0OxrdRJMnpBXMVsRs1p?p=preview

于 2013-07-05T14:04:45.697 回答