var currentWindow;
Ext.EventManager.onWindowResize(function(){
if(currentWindow){
currentWindow.setHeight(document.body.clientHeight * 0.8 );
currentWindow.setWidth(document.body.clientWidth * 0.8 );
currentWindow.center();
}
});
//Ext.EventManager.onWindowResize(abcresize);
var win = new Ext.Window({
title : 'Layout Window',
closable : true,
width : 600,
height : 350,
//border : false,
plain : true,
layout : 'border',
items : [nav, tabs]
});
win.addListener('beforeshow',function(o){
currentWindow=o;
});
win.addListener('destroy',function(o){
currentWindow=null;
});
win.show(button);
ExtJs window始终居中
最新推荐文章于 2020-03-27 15:37:01 发布