2013-07-27 35 views
0

如何將列表設置爲100%高度,以填充網站上的完整空閒空間?如何將列表設置爲100%的高度?

我的頁面看起來是這樣的:

Ext.define('MyApp.view.MeinView', { 
    extend: 'Ext.navigation.View', 

    config: { 
     items: [ 
      { 
       xtype: 'formpanel', 
       title: 'MyApp', 
       id: 'StartAnsicht', 
       items: [ 
        { 
         xtype: 'list', 
         docked: 'top', 
         height: 200, 
         ui: 'round', 
         itemTpl: [ 
          '<div>{titel}: {inhalt}</div>' 
         ], 
         store: 'EintragStore' 
        }, 
        { 
         xtype: 'button', 
         docked: 'bottom', 
         id: 'NeuerEintrag', 
         itemId: 'mybutton1', 
         ui: 'action', 
         text: 'New' 
        } 
       ] 
      } 
     ], 
     listeners: [ 
      { 
       fn: 'onNeuerEintragTap', 
       event: 'tap', 
       delegate: '#NeuerEintrag' 
      } 
     ] 
    }, 

    onNeuerEintragTap: function(button, e, eOpts) { 
     this.push(Ext.create("MyApp.view.AddAnsicht", { 
      title: "New Item" 
     })); 
    } 

}); 

實際高度設置爲200,但我想它會自動100%的高度和填充的自由空間,讓我看到的只是:

  • 頂欄,
  • 列出了所有可用空間,
  • 按鈕

回答

1

我發現了,我可以用VBOX

+1

做什麼或者是一個佈局「合適」。 – Drasill

相關問題