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,
I'm not sure I fully understand, but your second approach is probably right. When you add elements to the Group try specifying an x/y on the element that you know is in view and set a size like 100x100, do the elements show up then?