【问题标题】:extjs 3 combo-box lable width and input field widthextjs 3 组合框标签宽度和输入字段宽度
【发布时间】:2015-12-14 17:39:29
【问题描述】:

我需要将组合框标签添加到一行。我正在使用 extjs3

代码

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();
                                     }
               }
             ]
});

截图

【问题讨论】:

  • 增加labelWidth或动态调整大小,参考this answer

标签: javascript extjs web-deployment extjs3


【解决方案1】:

labelWidth 是 FormPanel 或 FieldSet 的属性,不适用于组合框。将其移至您的表单面板,以便它可以工作。

【讨论】:

    【解决方案2】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-09-15
      • 1970-01-01
      • 2016-07-14
      • 1970-01-01
      • 2014-06-19
      • 2014-10-07
      • 1970-01-01
      相关资源
      最近更新 更多