1 Reply Latest reply on Sep 21, 2010 9:20 PM by Shongrunden

    scroll Panel's dynamic content

    Manno Bult-to3djt Level 2

      Hi all,

       

      Pretty new at Flex, and/so could not find this anywhere:...

       

      I have a panel to which I add elements (AS3 class, subclassed from container which loads external images based on XML file's content) with addElement();

       

      I would like the panel to look much like the Flash IDE's stage including clipboard area, for now it can be considered one 'canvas' in which objects can be dragged around. The canvas is bigger than the panel, so the panel needs to scroll.

       

      The problem is that I can't get the scrollbars right.

       

      Things I tried:

       

      * Plain panel to which I add stuff. Result: elements can end up outside of the panel still showing (compare CSS overflow: visible)

       

      * Panel with Scroller in it, sroller wrapping a group. Scroller set to 100% w and h, elements are added to the group. Result: nothing shows

       

      * Panel with Scroller in it, sroller wrapping a group. Scroller set to 100% w and h, elements are added to the panel. Result: same as first test

       

      A simple MXML hardcoded panel with scroller, group and other content works fine, bit is of no use to me since content is loaded from XML. Anyone care to help out a noob?

       

      Thanks in advance,

      Manno