0

Borderlayout behaviour with splittable="true" and vflex="min"

asked 2013-06-20 13:37:35 +0800

SimonDark gravatar image SimonDark
6

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

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-06-20 13:37:35 +0800

Seen: 38 times

Last updated: Jun 20 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More