PDA

View Full Version : Center panel with minimum dimensions



F1
7 Jul 2007, 8:36 PM
I have been reading through some of the Ext demos and tutorials, although I admit I haven't taken the time to thoroughly learn the finer aspects of the library, as I am still deciding whether it is appropriate for my purposes.

I wish to have a basic layout, in the form:



+--------+----------+
| A | B |
| | |
+--------+----------+
| C |
+-------------------+


Here lies the problem. The way I understand it, the default behaviour of an Ext layout is for west/east and north/south panels to have a set height, and for the centre panel to fill the remainder space. However, for my purposes, I wish to have the center (A) panel to have a minimum height and width, and for the other two panels (B and C) to fill the remainder of the space. Is this possible at all using Ext native code; if not, what is the best way to achieve this result?

On a related note, is it possible to change the position of a panel at runtime without reloading? That is, could I have a button to move the south panel to the north, or the west panel east? I would need to keep the contents of the panel intact, so I couldn't retrieve the innerHTML of the south panel and insert it into the north panel, for example. I looked through the documentation (though not the Ext source, yet, for reasons stated above) and found nothing.

Thanks for any help you can give.