当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 学习ExtJS Window常用方法

Javascript
form中限制文本字节数js代码
use jscript with List Proxy Server Information
use jscript List Installed Software
List Installed Software Features
List Information About the Binary Files Used by an Application
List the Codec Files on a Computer
List the UTC Time on a Computer
List Installed Hot Fixes
excel操作之Add Data to a Spreadsheet Cell
Add Formatted Data to a Spreadsheet
Apply an AutoFormat to an Excel Spreadsheet
JavaScript语法着色引擎(demo及打包文件下载)
类之Prototype.js学习
一款JavaScript压缩工具:X2JSCompactor
iis6+javascript Add an Extension File
jscript之Open an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
jscript之List Excel Color Values
去除图像或链接黑眼圈的两种方法总结
Add a Formatted Table to a Word Document

Javascript 中的 学习ExtJS Window常用方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-10   浏览: 645 ::
收藏到网摘: n/a

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();
})