Auto resize BorderLayout vertically based on content?
Auto resize BorderLayout vertically based on content?
Hi,
Does anyone know if it's possible to auto resize a BorderLayout automatically (vertically) based on the size of the content? I'm not using document.body as the element, but rather a div inside the document.
I have a west and a center panel. West is pretty static but Center is dynamic. It has a TabPanel where the content of the tabs can grow dynamically (w/ javascript).
I can get the panel to scroll, but I would rather the user see everything.
my container div is position: relative.
I've set the height to a pixel value, and to a % value (together w/ a min-height) but the layout doesn't move.
I've also enclosed the BorderLayout in an Ext.Resizable. I can resize with handles but I want it to grow vertically.
Aside from using document.body, is there any way to make my BorderLayout grow vertically?
Cool, thanks! That's a start.
When I pull the resize handle on the Resizable, it redraws the insides of the BorderLayout.
Now, how can I hook into the BorderLayout and find out if a scrollbar was generated and resize automatically based on the size of the inside panel? That would be ideal.
Thanks for your help!
Joe
...So basically I want the BorderLayout to function like it was attached to document.body, but not attached to the top of the document, since I have some other stuff up at the top. I'd like it to attach to the left/right of the document and grow w/ resizing the document, and expand vertically to accommodate my growing content.
I too am trying to have a border layout region size itself based on its content. However I cannot seem to get this to work. I have tried:
panel.setSize(x,y);
layout.layout();
(where panel is the panel in the layout, and layout is the BorderLayout). I do this when I know the contents of the panel have changed shape, but this is not working. I can't find this setContentSize method you are describing. Where is that?
Thanks
Sean
Originally Posted by joaosobrinho
I have something like that.
i use the setContentSize method.
but in this case, when the BorderLayout grows, i know the exact size that grows...