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

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相关方法简单使用

上一篇:Mybatis 的标签用法 prefix prefixOverrides suffix suffixOverrides


下一篇:Process Order API - How To Scripts