如何将列表设置为100%高度?

时间:2013-07-27 09:13:29

标签: extjs sencha-touch sencha-touch-2

如何将列表设置为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 个答案:

答案 0 :(得分:1)

我发现,我能用VBOX

做些什么