1

我正在使用 BorderLayout 并尝试在左侧面板折叠时调整中心区域的大小。我的中心区域是一个标签面板。我的一个标签包含一个网格面板。我想在折叠时调整中心区域选项卡面板中的任何面板的大小。

App.centerTabPanel 是对中心区域的选项卡面板的引用。App.mainPanel 只是我正在测试调整大小的选项卡之一。

没有任何东西可以调整大小,我的标签布局“适合”。只有当我重新加载商店时,带有网格面板的选项卡才会调整大小。

这是我的代码:

Ext.override(Ext.layout.BorderLayout.Region, {


        onCollapse : Ext.layout.BorderLayout.Region.prototype.onCollapse.createSequence(function() {
                    //App.centerTabPanel.doLayout(); //doesn't work
                    //App.centerTabPanel.getActiveTab().doLayout() // doesn't work
            //App.centerTabPanel.syncSize(); // doesn't work
            App.mainPanel.getStore().reload(); // this works, when the store reloads it resizes the grid
        })
    });
4

1 回答 1

0

尝试将配置选项split : true添加到边框布局中的所有项目(区域)

于 2012-09-07T18:49:12.413 回答