PDA

View Full Version : Panel width inside regular <div>



ShatyUT
17 Feb 2010, 6:28 AM
I am placing my Ext JS components inside an existing web application that was built without Ext JS. As a result, my first parent Panel is inside another div element that resizes itself automatically when the browser window size is changed.

How can I get my Panel to do the same thing? Viewport won't work because I can't take over the entire window unfortunately. There are some existing tabs from another library and I have to place my stuff inside two of those tabs. I would like my stuff to take over the entire space available in the two tabs...specifically width.

Thanks!

17 Feb 2010, 7:17 AM
... listen to the window resize event and adjust accordingly.

ShatyUT
17 Feb 2010, 7:27 AM
So, grab the parent width and set the current panel to match?

Really the problem starts from the initial load. I can set a specific width, I guess, to match the space that is there but would prefer for it to just be calculated for me. I guess I should do this during the onload event?

If I've got my first panel with layout: 'anchor' then the children below it should resize with their parent right?

17 Feb 2010, 7:28 AM
So, grab the parent width and set the current panel to match?

Really the problem starts from the initial load. I can set a specific width, I guess, to match the space that is there but would prefer for it to just be calculated for me. I guess I should do this during the onload event?

If I've got my first panel with layout: 'anchor' then the children below it should resize with their parent right?

... if you set the child anchor property :)

ShatyUT
17 Feb 2010, 7:30 AM
Thanks! I'll give this a try.