PDA

View Full Version : BorderLayout Prioity?



rfox
2 Dec 2011, 1:58 AM
From the border layout docs:

The child item in the center region will always be resized to fill the remaining space not used by the other regions in the layout

I was wondering if it would be possible to reconfigure the layout to give ALL regions in the layout equal space when a panel is collapsed?

I have a layout with a west,center and east panel, The west panel will be collapsed quite often by the user, the other 2 will stay open. By default the center region expands to the available space. I would like the east and center regions to be resized equally. I've tried tieing into the panels collapse event but was wondering if there was an easier way to do it?

Thanks again :)

tvanzoelen
2 Dec 2011, 4:17 AM
If you have not a south and a north region. Maybe by using a column or hbox layout.

rfox
2 Dec 2011, 6:51 AM
Its Likely that ill have a top and bottom within the app's creation at some point

Would a border layout whose center region is a hbox containing my original panels provide the same effect?

tvanzoelen
2 Dec 2011, 6:54 AM
It probably would. Put your current east, center, west panel in a new center panel. And yes give that center panel a hbox layout.