您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

学习ExtJS Window常用方法_extjs

2024/4/12 14:13:44发布19次查看
一、属性
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();
})
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product