0
votes

I've created a combobox in accordion layout in a viewport but the fildlabel didn't appear with my combobox. Note: I work on geoext 1-1 & Extjs 3-4-0. This is my code:

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
You should put your combo into a form. Form fields need to be in a form to develop their full behavior. - Lorenz Meyer

1 Answers

1
votes

If you want to see fieldLabel, your components should be added under container with FormLayout. Add layout: 'form' to your tab config, and your label will appear.

Working sample: http://jsfiddle.net/Rvapq/3/