【问题标题】:Positioning components in Ext JS [closed]在 Ext JS 中定位组件
【发布时间】:2013-08-02 19:59:38
【问题描述】:

这是我所拥有的:

这就是我想要的:

这里有一些代码:

                        { xtype: 'combobox', padding: 5, fieldLabel: 'Search In', store: states, displayField: 'field1', id: 'criteria_3_drop_down', hidden: true  },
                        { xtype: 'textfield', padding: 5, region: 'west', fieldLabel: 'Criteria 3', id: 'criteria_3_input', hidden: true   },
                        { xtype: 'button', text: 'Search', margin: '0 0 5 120', padding: '0 30 0 30', itemId: 'search'},
                        { xtype: 'button', text: '+', id: 'add_criteria' }

有什么想法吗?

【问题讨论】:

  • 您应该发布更多信息以及您已经做出的任何尝试
  • 我放了一些我目前拥有的代码
  • @user2291971 我希望我们不会再看到类似的爆发。

标签: button extjs components panel


【解决方案1】:

您应该使用FieldContainer 将条件框和+ 按钮与hbox 组合在一起:

{
    xtype: 'fieldcontainer',
    fieldLabel: 'Criteria 3',
    layout: 'hbox',
    items: [
        { xtype: 'textfield', id: 'criteria_3_input' },
        { xtype: 'button', text: '+', id: 'add_criteria' }
    ]
}

【讨论】:

    猜你喜欢
    • 2013-09-21
    • 1970-01-01
    • 2012-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多