View Full Version : Managing East and West region sizes without hardcoded widths?

30 Nov 2010, 7:07 PM
I seem to be confused with sizing my west region of my border layout viewport. My west region is a normal panel containing an extended treepanel. In my normal panel I set autoWidth: true, and everything seemed fine (the west panel was a manageable width). However, adding a top toolbar to my extended treepanel causes the west region to take up all of the screen, even with only one button in the toolbar.

No combination of autoWidths seem to bring it back to a manageable size (which makes sense I guess because the toolbar is stretching to 100% of the panel). The only way I have been able to bring the west panel to an appropriate width (when the toolbar is there) is by hardcoding a width for the panel.

Is there any way to make this work decently without hardcoding a width?

30 Nov 2010, 9:47 PM
As always, it all depends on your end goal. Are you needing collapsable panels (i.e. border layout)? If you simply need to layout certain panels with dynamic widths, perhaps an "hbox" layout would work better? Maybe you could post some sample code for a closer look.