Ext formpanel的问题,急急急
时间:2011-09-05
来源:互联网
JScript code
var formPanel = new Ext.form.FormPanel({ id: 'ndjhform', xtype: 'fieldset', //plain: true, layout: "column", defaultType: "textfield", labelWidth: 85, baseCls: "x-plain", //锚点布局- defaults: { anchor: "95%", msgTarget: "side" }, buttonAlign: "center", bodyStyle: "padding:0 0 0 0", items: [{ // buttonAlign: "center", // layout : 'column', // bodyStyle : 'background:transparent', // border : false, // items: [{ columnWidth: .5, layout: 'form', bodyStyle: 'background:transparent', border: false, items: [ this.begindDate, this.dwbmCombobox, this.xxtsText, this.dwbmText, this.zbbmText ] },{ columnWidth: .5, layout: 'form', bodyStyle: 'background:transparent', border: false, items: [ this.endDate, this.zbbmCombobox, this.zbbmgrid, this.dwmcText, this.IDText ] //}] }] }); return formPanel; },
生成效果如下

作者: doyouknowm 发布时间: 2011-09-05
作者: doyouknowm 发布时间: 2011-09-05
layout: "column",
改成
layout: "form",
试试
作者: wyx177694333 发布时间: 2011-09-05
作者: doyouknowm 发布时间: 2011-09-05
作者: wyx177694333 发布时间: 2011-09-05
LZ将第5行的
layout: "column",
改成
layout: "form",
试试
不行,试了
作者: doyouknowm 发布时间: 2011-09-05
LZ你的第13~18行的不能注释掉啊..那表示的时按column(行)排列,也就是其中所有的items占一行
因为加上了也不管用,所以就注释掉了
作者: doyouknowm 发布时间: 2011-09-05
frame: true,
fileUpload:true,
style:'padding:1px',
items: [
{
xtype: 'fieldset',
labelWidth: 115,
title:this.processeDetailText,
layout:'form',
collapsible: true,
labelAlign : "left",
autoHeight: true,
items: [
{
// 第一行
layout : "column",
items:
[{
columnWidth : .5,
layout : "form",
items:
[{
fieldLabel: this.barcodeidText,
name: '',
xtype: 'textfield',
allowBlank:false,
}]
},
{
columnWidth : .5,
layout : "form",
items:
[{
fieldLabel: this.sampleNameText,
name: '',
xtype: 'textfield',
allowBlank:false,
readOnly:true
}]
}]
},{
// 第二行
layout : "column",
items:
[{
columnWidth : .5,
layout : "form",
items:
[{
fieldLabel: ,
name: '',
xtype: 'textfield',
allowBlank:false
}]
},
{
columnWidth : .5,
layout : "form",
items:
[
new Ext.form.ComboBox({})
]
}]
},{
// 第三行
layout : "column",
items:
[{
columnWidth : .5,
layout : "form",
items:
[
new Ext.form.ComboBox({})
]
},
{
columnWidth : .5,
layout : "form",
items:
[{
fieldLabel: ,
name: '',
xtype: 'datefield',
format:'Y-m-d',
width: 127,
allowBlank:false
}]
}]
},{
// 第四行
layout : "column",
items:
[{
columnWidth : .5,
layout : "form",
items:
[{
fieldLabel: ,
name: '',
xtype: 'numberfield',
allowBlank:false,
readOnly: true
}]
},
{
columnWidth : .5,
layout : "form",
items:
[{
fieldLabel: ,
name: '',
xtype: 'numberfield',
regex: /^[0-9]+([.]{1}[0-9]{1,2})?$/,
regexText: this.errorNumber,
allowBlank: false,
readOnly: true
}]
}]
},{
// 第五行
layout : "column",
items:
[{
columnWidth : .5,
layout : "form",
items:
[{
fieldLabel: ,
name: '',
xtype: 'numberfield',
allowBlank:false,
readOnly: true
}]
},
{
columnWidth : .5,
layout : "form",
items:
[{
fieldLabel: ,
name: '',
xtype: 'textfield',
allowBlank:false,
regex: /(.*)(\.pdf)$/,
regexText: this.errorNumber,
readOnly:true
}]
}]
},{
// 第六行
layout : "column",
items:
[{
columnWidth : .5,
layout : "form",
items:
[
new Ext.form.ComboBox({})
]
},
{
columnWidth : .5,
layout : "form",
items:
[{
fieldLabel: ,
name: '',
xtype: 'textfield',
allowBlank:false
}]
}]
},{
// 第七行
layout : "column",
items:
[{
columnWidth : 1.,
layout : "form",
items:
[{
fieldLabel: ,
name: '',
xtype: 'textarea',
width: 452,
allowBlank:true
}]
}]
},{
// hidden
layout : "column",
items:
[{
columnWidth : 0,
layout : "form",
items:
[{
name: '',
xtype:'hidden',
allowBlank:false
}]
},
{
columnWidth : 0,
layout : "form",
items:
[{
name: '',
xtype:'hidden',
allowBlank:false
}]
}]
}]
}]
lz先试试这个,关键地方自己补全哈
作者: wyx177694333 发布时间: 2011-09-05
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28