学习ExtJS Window常用方法


一、属性
plain:布尔类型,true表示强制与背景色保持协调,默认值为false。
resizable:布尔类型,用户是否可以调整窗体大小,默认值为true表示可以调整大小。
maxinizable:布尔类型,true表示显示最大化按钮,默认值为false。
maximized:布尔类型,true表示显示窗体时将窗体最大化,默认值为false。
closable:布尔类型,true表示显示关闭按钮,默认值为true。
bodyStyle:与边框的间距,如:bodyStyle:"padding:3px"。
buttonAlign:窗体中button的对齐方式(left、center、right),默认值为right。
closeAction:"close"释放窗体所占内存,"hide"隐藏窗体,建议使用"hide"。

二、方法
show:打开窗体。
hide:隐藏窗体。
close:关闭窗体。

三、事件
show:打开窗体时触法。
hide:隐藏窗体时触法。
close:关闭窗体时触法。

四、应用举例

Ext.onReady(function(){
var _window=new Ext.Window({
title:"登陆",
renderTo:Ext.getBody(),
frame:true,
plain:true,
resizable:false,
buttonAlign:"right",
closeAction:"hide",
maximizable:true,
closable:true,
bodyStyle:"padding:4px",
width:310,
height:230,
layout:"form",
lableWidth:45,
defaults:{xtype:"textfield",width:180},
items:[{fieldLabel:"帐号"},{fieldLabel:"密码"}],
buttons:[{text:"确定"},{text:"取消",handler:function(){_window.hide();}}],
listeners:{
"show":function(){
alert("显示");
},
"hide":function(){
alert("隐藏");
},
"close":function(){
alert("关闭");
}
}
})
_window.show();
})

学习ExtJS 访问容器对象
一、属性ownerCt:得到当前对象所在的容器。items:集合列表二、应用举例Ext.onReady(function(){var_window=newExt.Window({title:"测试窗体",layout:"form",width:300,plain:true

学习ExtJS Column布局
一、属性(构造参数)baseCls:"x-plain"Panel背景色颜色。layout:"column"Panel进行列布局。在子元素中指定使用columnWidth或width来指定子元素所占的列宽度。columnW

学习ExtJS border布局
一、Border布局由类Ext.layout.BorderLayout定义,布局名称为border。该布局把容器分成东南西北中五个区域,分别由east,south,west,north,cente来表示,在往容器