zoukankan      html  css  js  c++  java
  • 关于在extjs中使用column布局,不能显示textfield的标签(fieldLabel)解决方法 子曰

     
    原因:fieldLabel is not rendered by the field itself, but by FormLayout. So for you to have a label you need to put the field in a form layout, e.g.

    在coluumn的子项中加上layout:'form'就ok了
     
    错误示例:
    var d = new Ext.Window({ 
            title: instance, 
            layout: 'border', 
            375, 
            height:275, 
            cls: 'x-dialog-popup-main', 
            items: [{ 
                region: 'center', 
                title: 'General Information', 
                layout: 'table', 
                layoutConfig: { columns: 2 }, 
                items: [ 
                    new Ext.form.TextField({ 
                        colspan: 2, 
                        fieldLabel: 'My Label', 
                        disabled: true, 
                        hideLabel: false 
                    }) 
                ] 
            }, { 
                region: 'south', 
                title: 'Controls', 
                height: 100 
            }] 
        });  
    
    

    需改动的:
    layout: 'table',
    layoutConfig: {columns: 2},
    items: [{
      layout: 'form',
      colspan: 2, 
      items: [{
        xtype: 'textfield'
        fieldLabel: 'My Label', 
        disabled: true,
      }]
    }]

  • 相关阅读:
    interview
    lvs简介
    编译参数说明
    nginx-arch
    network
    linux 密码修改方法
    ps命令详解
    sed 命令+正则表达式
    LINUX SCP 命令详解
    linux下mysql的root密码忘记解决方
  • 原文地址:https://www.cnblogs.com/suixufeng/p/3336178.html
Copyright © 2011-2022 走看看