学习ExtJS(七) Column布局
来源:互联网 发布:inside 知乎 编辑:程序博客网 时间:2024/06/05 22:37
一、属性(构造参数)
baseCls:"x-plain" Panel背景色颜色。
layout:"column" Panel进行列布局。
在子元素中指定使用columnWidth或width来指定子元素所占的列宽度。
columnWidth表示使用百分比的形式指定列宽度。
width则是使用绝对象素的方式指定列宽度,在实际应用中可以混合使用两种方式。
二、应用举例
Ext.onReady(function(){
new Ext.Window({
title:"新增",
width: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",
width: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() ;
}) ;
new Ext.Window({
title:"新增",
width: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",
width: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,
width:500,
height:300,
layout:"column",
items:[{title:"列1",width:200},
{title:"列2",columnWidth:.3},
{title:"列3",columnWidth:.3},
{title:"列4",columnWidth:.4}
]
})
}) ;
var _panel = new Ext.Panel({
title:"人员信息",
renderTo:Ext.getBody(),
frame:true,
width:500,
height:300,
layout:"column",
items:[{title:"列1",width:200},
{title:"列2",columnWidth:.3},
{title:"列3",columnWidth:.3},
{title:"列4",columnWidth:.4}
]
})
}) ;
- 学习ExtJS(七) Column布局
- ExtJs Column布局
- extjs column列布局
- extjs 布局 -列布局 column
- extjs-布局 (在column布局中使用fieldset 和 在fieldset中使用column布局)
- extjs-布局 (在column布局中使用fieldset 和 在fieldset中使用column布局)
- ExtJS学习笔记七:复杂页面布局实现
- (转)form和column:extJS的布局
- Extjs Column布局常见问题及解决方法
- form和column:extJS的布局关键字
- Extjs Column布局常见问题及解决方法
- Extjs Column布局常见问题及解决方法
- Extjs Column布局常见问题及解决方法
- extjs combobox column布局为什么折叠在一起
- Extjs Column布局常见问题及解决方法
- extJs的layout : 'column'布局出错
- ExtJS学习笔记(七) render方法
- 学习ExtJS(八) border布局
- 学习ExtJS(五) Window常用方法
- Proverbs
- 学习ExtJS(六) 访问容器对象
- Tomcat 配置文件笔记
- 正向代理与反向代理
- 学习ExtJS(七) Column布局
- 设计模式学习与实践(九)----适配模式(adapter)
- 分享一下方法 用SQL2005以上版本
- 学习ExtJS(八) border布局
- Linux环境进程间通信(五)(下)
- hashtable(哈希表)
- 学习ExtJS(九) fit布局
- spring 配置 quartz排程任务小结
- 感悟人生