2012-04-03 100 views
1

当我调整我的窗口然后警报宽度和高度,然后再次调整我的窗口再次调整警报宽度和高度,它将如何请帮助。在extjs4我如何获得听众extjs 4的窗口宽度和高度?

new Ext.Window({ 
    title:'my window', 
    id:'mywindow', 
    listeners:{ 
      alert("need width and height"); 
    } 
}).show(); 

请帮帮我。 在此先感谢。

回答

3

尝试加入 '调整大小' 的窗口事件

Ext.create('Ext.window.Window', { 
    title : 'Hello', 
    height : 200, 
    width : 400, 
    layout : 'fit', 
    listeners : { 
       'resize' : function(win,width,height,opt){ 
        console.log(width); 
        console.log(height); 
       } 
    } 
}).show(); 

参考Ext.window.Window-event-resize

相关问题