PDA

View Full Version : Expanding and collapsing of Panels in Border Layout



ruchika
15 Sep 2009, 4:06 AM
Hi,
I am using border layout in my screen. the west panel occupies 25% of the screen width and the centre panel occupies the remaining 75% of the sceen.
By default on collapsing of the west panel, the panel width becomes 0 and the centre panel expands to the screen width.
The requirement is, on collapsing of the west panel, i want the panel to collapse by 75 % of its current width and the centrepanel to expand the same width.

How do i achieve the same?

aconran
15 Sep 2009, 6:20 AM
ruchika -

Unfortunately our border layout does not yet support percentage widths. This is a feature request that we intend to implement in the near future.


As far your specific requirements you would have to implement a subclass of border layout which performs your "semi-collapsed" state to preserve screen real estate while still preserving the functionality available in that west panel.

Jack9
15 Sep 2009, 11:20 AM
If you can find out what the width of the west panel is, capture the click/collapse and do the % calc yourself and set a static width as minimum. Will that work?