3 Replies Latest reply on Oct 26, 2008 5:21 PM by Newsgroup_User

    How to make a rigid container ?

    Pierre_L
      Hello,

      Suppose that we have the following tree :
      <mx:Application>
      <mx:Box id="mybox" height="100%" />
      <mx:Application>

      and that we dynamicaly add content to mybox, so much that the height of the content of mybox become greater that the screen height. With the default behavior, mybox will grow indefinitely and a vertical scroll will appear at mx:Application level.
      I would like a more rigid behavior. I'd like that mybox grows until it reaches the screen height and then a vertical scroll appear in mybox. The first idea (that works) is to define mybox.height="{Application.application.height}", but this is not very pratictal since inner height is possibly different from outer height, moreover, we need to use this trick at every level of the tree.
      Do you know another way to achieve this result ? For example a property that indicates to a container that he must not try to fit to its content.

      Thank you in advance,
      Pierre L.
        • 1. Re: How to make a rigid container ?
          Level 7

          "Pierre L" <webforumsuser@macromedia.com> wrote in message
          news:ge2eel$j8b$1@forums.macromedia.com...
          > Hello,
          >
          > Suppose that we have the following tree :
          > <mx:Application>
          > <mx:Box id="mybox" height="100%" />
          > <mx:Application>
          >
          > and that we dynamicaly add content to mybox, so much that the height of
          > the
          > content of mybox become greater that the screen height. With the default
          > behavior, mybox will grow indefinitely and a vertical scroll will appear
          > at
          > mx:Application level.
          > I would like a more rigid behavior. I'd like that mybox grows until it
          > reaches
          > the screen height and then a vertical scroll appear in mybox. The first
          > idea
          > (that works) is to define mybox.height="{Application.application.height}",
          > but
          > this is not very pratictal since inner height is possibly different from
          > outer
          > height, moreover, we need to use this trick at every level of the tree.
          > Do you know another way to achieve this result ? For example a property
          > that
          > indicates to a container that he must not try to fit to its content.
          >
          > Thank you in advance,
          > Pierre L.

          maxHeight?


          • 2. Re: How to make a rigid container ?
            Pierre_L Level 1
            maxHeight is not the solution, becouse we have to type maxHeight="{Application.application.height}" and the problem is identical.
            Let me explain more precisely the issue. When mybox grows, mx:Application's content space grows if needed (with a scrollbar) and then the height of mygrows is set to 100% of the new inner size of mx:Application (but there is no change since mx:Application fit mybox).
            I would like the following, when mybox grows, a scrollbar appears if it exceed 100% of the current size of mx:Application.
            • 3. Re: How to make a rigid container ?
              Level 7

              "Pierre L" <webforumsuser@macromedia.com> wrote in message
              news:ge2uj4$ae0$1@forums.macromedia.com...
              > maxHeight is not the solution, becouse we have to type
              > maxHeight="{Application.application.height}" and the problem is identical.
              > Let me explain more precisely the issue. When mybox grows,
              > mx:Application's
              > content space grows if needed (with a scrollbar) and then the height of
              > mygrows
              > is set to 100% of the new inner size of mx:Application (but there is no
              > change
              > since mx:Application fit mybox).
              > I would like the following, when mybox grows, a scrollbar appears if it
              > exceed
              > 100% of the current size of mx:Application.

              maxHeight on Application?