View Full Version : complex layout: get width and height of center region

21 Aug 2009, 8:35 AM
Howdy all. I'm just starting to work with ext and i'm playing with the complext.html layout in the examples collection.
I am having a hard time figuring out how to obtain the "center" region's width and height at any given time so that I can then resize a div that I have placed in the full space of the center region. I have some image zoom and pan code that needs to live inside a div and it's that div that i'm placing into the entire center region. When the user resizes the browser and hence the center region, I need to attach a handler to resize the div inside of it. But, after searching around and looking at code, i'm still unable to find the solution. Can someone point me in the right direction as far as possible some code in the distro somewhere that will have an example, or post a simple example that I can check out?


21 Aug 2009, 8:54 AM
The div always needs to cover the entire center region?

In that case a 'fit' layout with the div as the item would probably be the best solution (no need for manual resize coding).

But you also could use the div as the center region itself (less overhead).

21 Aug 2009, 9:19 AM
Yes, the div always needs to cover the center region.
Yeah, the fit layout was my ticket.

Condor, thank you very much for the quick response, that was exactly what I trying to figure out. Works perfectly. Now I can move on to the rest of this awesome framework.