First time here? Check out the FAQ!
Hallo everyone,
today I was confused by the behaviour of a border layout's layout region with the following combination of attribute values: splittable="true" and vflex="min". Consider the following example concentrating on the south layout region:
<borderlayout width="300px" height="300px">
<north>
<div height="100px" style="background:#008db7;color:white;">N</div>
</north>
<south splittable="true" collapsible="true" maxsize="150" vflex="min">
<div height="50px" style="background:#f2f2f2;">Hallo</div>
</south>
<center autoscroll="true">
<div height="200px">C</div>
</center>
<east flex="true">
<div width="30px" style="background:#f2f2f2;">E</div>
</east>
<west flex="true">
<div width="20px" style="background:#f2f2f2;">W</div>
</west>
</borderlayout>
South is splittable (splittable="true") and its minimal height depends on the height of its children (vflex="min"). The only child of south is a div with a fixed height of 50px. According to the documentation a minimum space should be given to the south region - in this case 50px (the height of its only child). Here is an excerpt of the documentation of setVflex():
"Special flex hint, "min", indicates that the minimum space shall be given to this flexible component to enclose all of its children components. That is, the flexible component grow and shrink to fit its children components."
Unfortunately the combination makes it impossible for the south layout region to grow to its maximal heigth which declared as 150px. In addition changing the size of the south region is not possible at all. In other words vflex="min" disables splittable="true".
Perhaps I am doing something wrong or misunderstood the documentation....
Any hints and help will be greatly appreciated.
Cheers
Asked: 2013-06-20 13:37:35 +0800
Seen: 38 times
Last updated: Jun 20 '13