PDA

View Full Version : Extjs layouts: how to order?



lvil
15 May 2011, 10:48 AM
I have a viewport. It has several containers in the center region. When a menu button is clicked all the containers are being hidden, 3 items (buttongroup,form,grid) are added to a specific container and it is shown.
I have two questions:
1. How to arrange the items added with layout? (buttongroup - above & fixed height because the size of buttons is specified, form in the middle, grid bottom & taking 100% of the width and height left)?
2. How to refresh the layout of the container (doLayout doesn't work, I can see the change only resizing the browser)?

ps: the container itself is within anchor layout, having anchor 100% 100%
ps2: the grid is empty now

thank you.

drian
16 May 2011, 1:41 AM
1. Items are arranged in the order you put them. I would suggest rendering all items and having them hidden until you need them to be shown.

2. How are you adding those items? If you're using .add on a container then using .doLayout on he same container should work.

lvil
16 May 2011, 2:13 AM
And which layout should I use?

drian
16 May 2011, 2:18 AM
Could you send a screenshot of how it should look?

By the way, you should definitely try Ext Designer for layouts... it does wonders and will save you a lot of time ;)