ComboBox Extjs中的fieldLabel

时间:2013-10-27 10:34:01

标签: extjs combobox extjs3

我在视口中创建了一个手风琴布局的组合框,但fildlabel没有出现在我的组合框中。 注意: 我在geoext 1-1& Extjs 3-4-0。 这是我的代码:

new Ext.TabPanel({
    border: false, // already wrapped so don't add another border
    activeTab: 1, // second tab initially active
    tabPosition: 'bottom',
    items: [{
        html: '<p>A TabPanel component can be a region.</p>',
        title: 'A Tab',
        autoScroll: true,
        items: [  {
                xtype: 'button',
                text: 'test',
                tooltip: 'Test Button'
            },{
                xtype: 'combo',
                tooltip: 'promosCombo ',
                id : 'promosCombo',
                fieldLabel : "city",
                triggerAction : 'all',
                emptyText : "Select",
                editable : false,
                store : promosStore,
                mode : 'local',
                valueField : 'value',
                buttonAlign : 'center',
                labelAlign : 'right',
                labelWidth : 70,
                displayField : 'display'
}]})

1 个答案:

答案 0 :(得分:1)

如果您想查看fieldLabel,您的组件应添加到FormLayout的容器下。将layout: 'form'添加到标签配置中,系统会显示您的标签。

工作样本:http://jsfiddle.net/Rvapq/3/

相关问题