首页 > Windows开发 > 详细

ExtJs--06--Ext.WindowGroup相关方法简单使用

时间:2014-11-11 19:09:14      阅读:377      评论:0      收藏:0      [点我收藏+]
Ext.onReady(function(){
	
	
//用windowGroup对象去操作多个window窗口
var winG = new Ext.WindowGroup();
for (var i = 1; i <= 5; i++) {
	var win = Ext.create("Ext.Window",{
		id:"win_"+i,
		title:"第"+i+"个窗口",
		width:200,
		height:200,
		renderTo:Ext.getBody()
	});
	win.show();
	winG.register(win);
}
var btn1 = Ext.create("Ext.button.Button",{
	text:"全部隐藏",
	renderTo:Ext.getBody(),
	handler:function(btn){
		winG.hideAll();
		
	}
});
var btn2 = Ext.create("Ext.button.Button",{
	text:"全部显示",
	renderTo:Ext.getBody(),
	handler:function(btn){
		winG.each(function(win){
			win.show();
		})
	}
});

var btn3 = Ext.create("Ext.button.Button",{
	text:"将第二个显示在最前端",
	renderTo:Ext.getBody(),
	handler:function(btn){
		winG.bringToFront("win_2");
	}
});
var btn4 = Ext.create("Ext.button.Button",{
	text:"将第二个显示在最底端",
	renderTo:Ext.getBody(),
	handler:function(btn){
		winG.sendToBack("win_2")
	}
});
	
})

ExtJs--06--Ext.WindowGroup相关方法简单使用

原文:http://blog.csdn.net/responsecool/article/details/41014693

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!