PDA

View Full Version : Auto arrange sub panels in a panel on hiding/adding



srikanthvarma
6 Dec 2012, 4:32 AM
Hi,<br><br>I have a requirement where I need to design a layout that has a main panel with subpanels arranged in 3X2 positions and the sub panels re arranges on hiding or adding one of them. This is to design a dashboard kinda tool which have multiple sections that shows various details of user. Designing such a layout with existing extjs layouts is not a problem but the big challenge is how to auto arrange the subpanels on hiding some of them. Lets say I hide two panels at positions (1,2) and (2,2) the remaining panels should move up and rearrange accordingly without leaving empty space at those positions. Any ideas how to implement this ???

mitchellsimoens
8 Dec 2012, 6:29 AM
Sounds like a good idea for a new layout you can create. Or you can use column layout and add/remove the items to where you want them.

srikanthvarma
9 Dec 2012, 9:00 PM
The example at below link suits my requirement,
http://dev.sencha.com/deploy/ext-4.0.0/examples/portal/portal.html,

but the code is minimized could anyone plz provide code to design such a portal layout.

srikanthvarma
26 Dec 2012, 5:04 AM
409644096540963Hi,

I have used the portal example and customized it for my requirement. I am facing issue when dragging a portlet (especially when the portlets vertically crossed the window height and vertical scroll appears). The height of actual panel body is getting reduced by some size when a portlet at bottom is dragged somewhere due to which the header section is not visible afterwards.

Refer to screenshots.

I dont need any side panel (on left side) as in the example that was shown in sencha examples. Since there is side panel you maynot have faced issue when dragging. Just try the same example with out left panel and see if u face same issue !!!

Note: See that the portlets height is around 500px each so that the portlets in a column crosses the vertical size of the window and a vertical scroll bar appears .