2012-04-03 55 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

相關問題