2012-11-23 21 views

回答

5

試試這個:

Ext.Viewport.init(); 
     Ext.create('Ext.Panel'({ 
      fullscreen:true}) 

添加到您的主應用程序文件。如果你的主視圖是一個面板,這將起作用。你也可以添加它作爲你的應用程序的屬性:

Ext.application({ 
    name: 'YourApp', 
    stores: [ 
    ], 
    controllers: [ 
    ], 
    views: [ 

    ], 
    viewport: { 
     autoMaximize: true 
    }, 
    launch: function(){ 

    } 
}); 
+0

new Ext.Panel(...);不是在ST2中創建面板或任何其他組件的正確方法。使用Ext.create('Ext.Panel',{...}) –

+0

Sry這是來自ST1的一些代碼。編輯好看! – jusynth