View Full Version : Add/remove form panels to/from a center regional panel

5 Dec 2010, 4:56 PM

I have created a viewport and then prepared few form panels.
All was created in Ext Designer. But I created each form panel separately.

I am wondering if I have to attach all panels to 'center' region (in order to make each panel for another action) panel and then show/hide them by hide() nad show() function? Is it a way how it's done well? I some other app I was using add and remove. But I have to check if panel was added to prevend duplicates.

Btw is there in net any examples of 'big apps' with multi panels in one component?

6 Dec 2010, 1:01 AM
Two options:
1. Make the center region layout:'card' and add all forms to it. Now you can use setActiveItem to select the proper page.
2. Make the center region layout:'fit' and add only the active form to it. When changing forms you will first have to destroy the previous form and then add a new one.

6 Dec 2010, 2:31 PM
Thank you Condor, it really help me a lot ;)