View Full Version : [2.0] Border Layout? - How to collapse 'west', 'north' & 'south' with one click?

22 Nov 2007, 1:18 PM
I have a typical border layout (taken from the example http://extjs.com/deploy/dev/examples/layout/complex.html) , and I want to provide a 'full-screen' button that collapses the 'west', 'north' & 'south' panels with one click. Thus, I'm looking to programmaticly toggle the slide in/out features on various panels of the border layout.

Here's a list of the various calls that I've been spinning my wheels on so far, with no success:
//m_south.el.slideOut('b', {durration: 1});
m_west.el.slideOut('l', {
afterStyle: {left: '0px', right: '0px;'} // Fixes mis-alignment from scrollbar

I'd much appreciate it if someone could explain how to toggle the various regions.


22 Nov 2007, 2:45 PM
I think you want to use expand/collapse instead of show/hide.

22 Nov 2007, 10:03 PM
Thanks Tim!

m_west.collapse() / m_west.expand()
m_south.collapse() / m_south.expand()
m_north.collapse() / m_north.expand()

are the functions I was looking for. Cheers.