【发布时间】:2012-09-07 17:02:58
【问题描述】:
我正在使用 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
})
});
【问题讨论】:
-
你为什么使用 ExtJS 2.3?它是旧版应用程序吗?