Auto resize BorderLayout vertically based on content?
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 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?
Thanks so much!
You could try making a call to
When a 'resize' event has occurred.
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!
Originally Posted by evant
...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.
Anyone ever tried this?
Sencha Premium Member
JKralicky, did you ever get this to work? I'm trying to do the same thing.
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...
Ext GWT Premium Member
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:
(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?
Originally Posted by joaosobrinho
Does anyone have solution/workaround to this ?
i want to dynamically resize the region in the BorderLayout, based on the contents of the region ?
Is it possible at all ?