0 Replies Latest reply on Feb 17, 2008 7:06 PM by callie16

    resizing children of hdividedbox

    callie16
      hello once again,

      i have something like this:

      <mx:HDividedBox width="100%" height="100%">
      <mx:Panel id="panel1" width="65%" height="100%" />
      <mx:Panel id="panel2" width="15%" height="100%" />
      </mx:HDividedBox>

      where the panels contain other components etc. when i drag the divider
      of the HDividedBox, i need the panels to resize accordingly... (um,
      yes, there is a reason why the widths are only 80% total :) )

      anyway, when i do drag the divider, and i resize the component i added
      dynamically to panel1, it still sees the original dimensions of
      panel1... say:

      initial state
      ----------------------------
      | | |
      | | |
      | panel1 | panel2 |
      | --------- | |
      | | comp1 || |
      | --------- | |
      ----------------------------

      then i resize panel 1 to:

      ----------------------------
      | | |
      | | |
      | panel1 | panel2 |
      | --------- | |
      | | comp1 | | |
      | --------- | |
      ----------------------------

      then, if i drag comp1 to resize:

      ----------------------------
      | x | |
      | x | |
      | panel1 x | panel2 |
      | ----------x | |
      | | comp1 x | |
      | ----------x | |
      | xxxxxxxxxxx | |
      ----------------------------

      scrollbars (represented by the x's) appear at the x and y coordinates
      of the initial state for panel1... when i debugged, i saw that the
      size does change... so i tried reassigning that to the size of panel1
      and panel2 (via simple assignment, via dividerRelease, via callLater,
      etc.) and even tried using the validate methods... the scrollbars
      still appear...

      i'm pretty sure i'm missing something and doing things wrong... i
      would really appreciate the help! :) i just need the child to follow
      the parent's dimensions... thank you so much...

      btw, i did not use percentWidth on the added component because the added component had computations and if i used percent width/height, i was having problems finding the dimensions needed for those computations... so the width and height were set instead of the percent values... i know it would be better if i used percentage values but... that's what happened... i can't do a recode right now because there are just so many child components (they're different views) so i have to find a solution (even a temporary one) until i have time to do just that :) Any further help will be appreciated :) Thanks!!!