PDA

View Full Version : Troubles with layout



zdeto
16 Aug 2007, 5:00 AM
Hi there,

It's my first time I'm using ext, I've looked at the docs and examples and I'm trying to rebuild my site with ext.

Unfortunately I'm stuck at building a simple layout but I couldn't find anything close to what I need in the examples.

Basically I need to have a fixed width central column, and this column needs to be split into 3 horizontal parts (rows). The up side must have a fixed height, the central part will have fixed width and variable height, and the bottom part that will have also a fixed height.

I figured it out that I could do this with nested layouts. But I got not luck, I don't know how to define the height of a layout. The initialSize property, seems to work in pixels and only defines width!? The API documentation does not provide details about the config object of the BorderLayout method.

I would appreciate some help. Thank you!

para
16 Aug 2007, 8:21 AM
The 'initialSize' config sets either width or height, based on the location of the panel. For North & South it sets height, East & West it sets width.
You cannot directly control the size of the center panel because it simply takes up whatever space is left.
However, you can calculate the initial widths of your east/west panels to make the center have a defined width. Something like widthEW = (totalSize - 600)/2; for a center width of 600px.
I'm sure there are even better ways to do it still.

Hope it helps.