Newbie: Add a panel to viewport's initComponent() by referring to a view
I start using Architect 2.x and have a couple of questions.
1. My viewport (initial view) has the border layout. I define another view using form panel. How can I add this view panel into the center region of my viewport by referring the form panel's userAlias? The code editor does not allow me to add the form manually into the initComponent()'s items array.
2. Instead of using view port, can I create a panel and config it to display in the center of the browser? and how to do it?
Is this what you want to do? When the view is "aligned" and not as a child to the upper level container, then you don't get the "region" property when you are using the border layout. (See MyTabPanel-red dot and MyToolbar-blue dot) For MyTabPanel I get to choose the region, but not for MyToolbar..Im not sure if that's what you want to do, but I hope this helps. screen.jpg
Thanks for your reply! However I'm not sure whether you understood my problem.
I configure my viewport to have a border layout. Architect2.x allows me to drag and drop panels to regions and configure them. All codes generated by Architect2.x for these panels are in the viewport js file.
On the other hand, I can define these panels in separate js files and in the viewport I manually specify in each region of the border layout a panel by using xtype= 'mypanel useralias'. If I can do this way all details of a panel are not in the viewport. Instead in the viewport layout I just have some basic config properties for the panel in each region.
Actually I already did this way by manually modifying my viewport to refer to panels that are defined in separate files and they are working fine.
I'm wondering if there is any way I can do the same thing in Architect2.x. And is it a good practice to separate panel definition from the viewport like I did?