为什么我的ExtJS选项卡不会显示带有边框布局的项目

时间:2010-12-18 22:00:10

标签: javascript layout panel extjs

截至目前,我的网站上有一个工作标签面板,当我执行操作时,标签会添加到标签面板中。现在,选项卡使用以下项目定义正确呈现所有项目

    return [{
        xtype: 'panel',
        region: 'north',
        autoHeight: true,
        items: this.buildToolbar()
    }, {
        xtype: 'panel',
        region: 'center',
        autoHeight: true,
        items: [{
            xtype: 'fieldset',
            title: 'Details:',
            collapsible: true,
            autoHeight: true,
            items: [this.detailForm]
        }]
    }];

但是,我现在只想在此选项卡中添加东部可折叠面板,因此在面板的配置中我添加了layout: 'border',。现在我的标签内没有任何内容呈现。如果我然后注释掉我的layout电话,那么一切都会很好。

当此面板设置为边框布局时,为什么没有渲染?

1 个答案:

答案 0 :(得分:2)

删除autoHeight: true(在每个级别 - 不要永远在BorderLayout中使用此功能)并将layout: 'fit'添加到您的中心区域。此外,不确定在你的字段集中添加一个表单是你想要的 - 可能反过来会更有意义。