zoukankan      html  css  js  c++  java
  • 对《Ext2.0 form使用实例》的一点补充

     经过新一轮实践,又掌握了不少东西。本文针对《Ext2.0 form使用实例》中没有谈到的东西进行一点补充。

    1、  增加一个空白列

     

    如图红色框部分,如果需要在列里面增加一个空白的位置,只要增加一个高度为28panel就行了。代码如下:

     

    items:[{

      columnWidth:.5,layout: 'form',border:false,

      items:[

          {xtype:'textfield',fieldLabel: '企业名称',maxLength:100,name: 'txt3',allowBlank:false,anchor:'90%',tabIndex:0},

          {xtype:'textfield',fieldLabel: '联系人',maxLength:30,name: 'txt5',anchor:'90%',tabIndex:2},

          {xtype:'textfield',fieldLabel: '联系电话',name: 'txt7',anchor:'90%',tabIndex:4},

          {xtype:'textfield',fieldLabel: '传真',name: 'txt9',anchor:'90%',tabIndex:6},

          {xtype:'textfield',fieldLabel: '电子邮件',name: 'txt19',anchor:'90%',tabIndex:8,vtypes:'email'},

          this.provinceCombo                                          

      ]},{

      columnWidth:.5,layout: 'form',border:false,

      items:[

                  this.classCombo,

                  {xtype:'textfield',fieldLabel: '职务',maxLength:100,name: 'txt4',anchor:'90%',tabIndex:1},

        {xtype:'textfield',fieldLabel: '手机',name: 'txt7',anchor:'90%',tabIndex:3},

                  {xtype:'textfield',fieldLabel: '公司主页',name: 'txt6',anchor:'90%',tabIndex:5,vtypes:'url'},

                  {xtype:'panel',border:0,height:28},

                  this.cityCombo

      ]}

    ]

     

    代码中红色部分。

     

    2、  Tab键控制光标焦点

    如果象上面那段代码定义form控件,你会发现tab键的循序是先一列完后再移动到另一列的,要修正这个问题,设置一下控件的tabIndex属性就行了。这个和Delphi等的编程有些类似,呵呵。
  • 相关阅读:
    Jenkins pipeline 流水线部署 并自定义 buildName 和 buildDescription 显示信息
    Jenkins中插件 pipeline 中声明式流水线的语法
    Linux 发送https POST请求sample ===Slack 频道中发送消息通知
    Jenkins pipline
    jenkins pipeline中获取shell命令的输出
    Chrome浏览器对标签进行整理和分组
    MacBook 对rar后缀的文件进行加压
    Macbook中Docker一栏的应用程序图标不见了,怎么找出来?
    [Pytest]运行指定的case
    软考 高项 重点知识点
  • 原文地址:https://www.cnblogs.com/hainange/p/6334356.html
Copyright © 2011-2022 走看看