2013-10-27 42 views
0

我在视口中以手风琴布局创建了组合框,但fildlabel没有出现在我的组合框中。 注: 我在地理文本上工作1-1 & Extjs 3-4-0。 这是我的代码:fieldLabel in ComboBox Extjs

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' 
}]}) 
+0

你应该把你的组合成一个表格。表单字段需要采用表单来发展其完整行为。 –

回答

1

如果你想看到fieldLabel,你的组件应该在容器加入FormLayout。将layout: 'form'添加到您的标签配置中,您的标签将出现。

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