3 Replies Latest reply on Jul 31, 2008 11:43 PM by Henk2

    Controlling scrollbars and container sizes

    jcase16 Level 1
      We are having this exact problem. This is a pretty crazy problem. It seems like inner containers are not "pushing" the outer containers out far enough. The only resolution that I can find is to set a bunch of static sizes for containers, but then we lose the flexibility. Any ideas? The scrollbars are ridiculous cause they are constantly getting cut off by the browser or are there when they shouldn't be. Is there a better way for apps with multiple layers that are larger than the normal height of a screen?
        • 1. Re: Controlling scrollbars and container sizes
          I'm constantly running into the same issue.
          Sometimes there are 3 horizontal or vertical scrollbars..

          Have you ever found a solution for this problem?
          • 2. Re: Controlling scrollbars and container sizes
            Jake Lyman
            Not sure if this will help you with your specific issue, but it is worth a shot!

            See this forum topic.
            • 3. Controlling scrollbars and container sizes
              Henk2 Level 1
              Thanks Jake,

              Reducing containers is surely a good thing. Unfortunately the application I'm working on is pretty large and at places there are easily between 5 and 10 nested containers. I'm not using AbsoluteLayout though and mostly a combination of HBox/VBox/Forms.

              One problem I ran into is with the use of HDividedBox, which when resizing caused its children to contain double scrollbars. The child would have a scrollbar and one of the child's children would have a scrollbar. If you get small enough then the parent also has a scrollbar. It ain't a pretty picture.

              Sofar I've found that HDividedBox has a problem with resizing a child component if that child is a container holding more components/containers. Its difficult to debug but my impression is that when the layout manager pass takes place, the child container's size hasn't been updated yet. As a result the deeper level is set larger than it should, causing an extra scrollbar.

              My workaround (bit hack) that helped somewhat is to catch the resize event in the HDividedBox child and set its minWidth to be the max of the measuredMinWidth of the child's children. This only affects how HDividedBox resizes its child, and isn't a general solution unfortunately.
              For those interested:

              function onResize(event:Event):void
              if ((child1 != null) && (child2 != null))
              this.minWidth = Math.max( child1.measuredMinWidth, child2.measuredMinWidth);