Search code examples
extjs4sencha-architectborder-layout

Extjs 4 / Sencha Architect - two same region in border layout


I am using Extjs 4 in Sencha Architect. I have 2 buttons when I press on first one I get 'Panel_1" displays at the bottom. I made it using border layout on parent panel and south region on child panel "Panel_1".

border layout

now I need to do the same thing and display "Panel_2" at the same place when button_2 pressed. but seems like I cannot set two panels at same region (south) in border layout.

Any another idea about how to accomplish that ?


Solution

  • You need to create a container in the south region with a card layout. Add both of your panels to this container and then use the southContainer.setActiveItem(card) function in your button handler to show the correct panel when you press the relevant button.