1

I am using a BorderLayout and trying to resize the center region when the left side panel is collapsed. My center region is a tab panel. One of my tabs contains a grid panel. I want to resize any panel that is in the center region tab panel on collapse.

App.centerTabPanel is a reference to the tab panel in the center region. App.mainPanel is just one of the tabs I am testing the resize with.

Nothing gets resized, I have my tabs with layout "fit". The tabs with a gridpanel do get resized only when I reload the store.

Here is my code:

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
        })
    });
user979051
  • 1,257
  • 2
  • 19
  • 35

1 Answers1

0

Try to add config option split : true to all items(regions) within border layout

maxmalov
  • 510
  • 2
  • 12
  • 1
    didn't work..extjs 2.3 is so buggy..even findByType doesn't traverse all the children..doesn't work properly. I'm just trying to atleast resize the grids at this point...findByType("grid") doesn't work..using findBy and checking for colModel property...this is insane.. – user979051 Sep 07 '12 at 19:00
  • try to call findByType("grid", **true**) – maxmalov Sep 08 '12 at 13:16