zoukankan      html  css  js  c++  java
  • 学习ExtJS(七) Column布局

    一、属性(构造参数)
    baseCls:"x-plain"  Panel背景色颜色。
    layout:"column" Panel进行列布局。
    在子元素中指定使用columnWidth或width来指定子元素所占的列宽度。
    columnWidth表示使用百分比的形式指定列宽度。
    width则是使用绝对象素的方式指定列宽度,在实际应用中可以混合使用两种方式。
    二、应用举例
     Ext.onReady(function(){
            
    new Ext.Window({
                    title:
    "新增",
                    
    500,
                    height:
    400,
                    plain:
    true,
                    layout:
    "form",
                    labelWidth:
    55,
                    items:[{
                       layout:
    "column",
                       baseCls:
    "x-plain",
                       style:
    "padding:5px",
                       items:[{
                          columnWidth:.
    5,
                          layout:
    "form",
                          labelWidth:
    50,
                          baseCls:
    "x-plain",
                       items:[{
                             xtype:
    "textfield",
                             fieldLabel:
    "姓名"
                          },{
                             xtype:
    "textfield",
                             fieldLabel:
    "姓名"
                          },{
                             xtype:
    "textfield",
                             fieldLabel:
    "姓名"
                          },{
                             xtype:
    "textfield",
                             fieldLabel:
    "姓名"
                          }]
                       },{
                         columnWidth:.
    5,
                         layout:
    "form",
                         items:[{
                             id:
    "name",
                             xtype:
    "textfield",
                             fieldLabel:
    "照片",
                             inputType:
    "image",
                             
    250,
                             height:
    50
                         }]
                       }]
                    
                    },{
                      xtype:
    "textfield",
                      fieldLabel:
    " 证号"
                    }],
                    showlock:
    false,
                    listeners:{
                      
    "show":function(_window){
                      
    if f(!_window["showLock"]){
                      Ext.getCmp(
    "name").getEl().dom.src = "default_pic.gif" ;
                      _window.findByType(
    "textfield")[4].getEl().dom.src = "default_pic.gif" ;
                     
    // alert(_window.findByType("textfield")[4].fieldLabel);
                       _window["showLock"]=true;
                       }
                      }   
                    },
                    buttons:[{text:
    "确定"},{text:"取消"}]
                }).show() ;
        }) ;
     Ext.onReady(function(){
            var _panel 
    = new Ext.Panel({
                    title:
    "人员信息",
                    renderTo:Ext.getBody(),
                    frame:
    true,
                    
    500,
                    height:
    300,
                    layout:
    "column",
                    items:[{title:
    "列1",200},
                    {title:
    "列2",columnWidth:.3},
                    {title:
    "列3",columnWidth:.3},
                    {title:
    "列4",columnWidth:.4}
                    ]
                }) 
        }) ;
  • 相关阅读:
    web3g163(网易)邮箱和博客数据架构设计
    webQQ(腾讯)EmailTMessage(腾讯微博记事本)
    ASP.net MVC 4 中Security.FormsAuthentication验证用户的状态(匿名|已登录)
    ASP.net:查找框设默认
    webQQ(腾讯)EMailQQMsg(仿QQ短信)数据库设计
    webQQ(腾讯)QZone仿QQ投票和测试程序数据库设计
    ASP.NET MVC 3 RTM
    【技术贴】Eclipse||Myeclipse tab缩进转换为空格教程
    【技术贴】解决Eclipse启动不了,一闪而过的问题
    【技术贴】解决U盘无法复制:磁盘被写保护,请去掉写保护或使用另一张磁盘。
  • 原文地址:https://www.cnblogs.com/easypass/p/1578409.html
Copyright © 2011-2022 走看看