增加一個空白列

如圖紅色框部分,如果需要在列里面增加一個空白的位置,只要增加一個高度為28的panel就行了。代碼如下:
| 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 ]} ] | 
代碼中紅色部分。
Tab鍵控制光標焦點
如果象上面那段代碼定義form控件,你會發現tab鍵的循序是先一列完后再移動到另一列的,要修正這個問題,設置一下控件的tabIndex屬性就行了。這個和Delphi等的編程有些類似,呵呵。Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1839340
新聞熱點
疑難解答