简体   繁体   中英

extjs 3 combo-box lable width and input field width

I need to get combo-box label to a one line. I'm using extjs3 .

Code :

var orq_type_button= new Ext.form.ComboBox({
        id:'testa',
        fieldLabel: 'Organization Type',
        editable:false,
        emptyText:'Empty',
        selectOnFocus:true,
        forceSelection: true,
        allowBlank: false,
        width: 350,
        labelWidth: 330,
    });

var assignConfig_window_formPanal = new Ext.form.FormPanel  ({
    id:'assignConfig_window_formPanal',
    frame:true,
    bodyStyle:'padding:5px 5px 0',
    height:110,
    buttonAlign:'center',
    items: [orq_type_button],
    buttons: [ {text: 'Save'} ,
               {text: 'Cancel',
                handler  : function() { 
                    assignConfig_window.hide();
                                     }
               }
             ]
});

Screenshot :

屏幕截图

labelWidth is a property of FormPanel or FieldSet, not for combobox. Move it to your form panel so that it can work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM