This content has been marked as final. Show 5 replies
TileList should do the trick perhaps - give it a specific width value and height 100% then itemRenderer="myIconRenderer"
myIconRenderer component should be a Box with just and <mx:Image id="pic"> and a bit of script to serve the pic.source maybe an array or something.
What I understand is that TileList is like an HTML table. You can have columns and rows but a column (or row) is always the same width (or height). I'm pretty sure you can't get around that.
Imagine my setup like this:
[____] [__] [__] [___] [____] [__]
[__] [___] [_____] [__] [___]
[___] [___] [___] [_____]
(those are supposed to be images, different widths but same height)
ah sorry i've got you now. You might have to do a calculation? Get the width of your container, get the width of all images and store in an array, calculate the array by processing one after the other and storing that width in a variable with the condition that the added widths do not exceed the container max width - if they do exceed then you create a display object (HBox) with the images added into it and add that as a child to your container. However this removes the repeater event because you are basically making a custom repeater through AS.
Look for the Flex FlowBox container. You an probably modify it to do what
"squareSquirrel" <firstname.lastname@example.org> wrote in message
> Simple question (I think): is there any way to wrap content generated with
> Imagine a grid of images (don't want to use a tilelist or grid because
> have same height but different widths)
> generated by a Repeater.
> I just want images to move to the next row as they reach the maximum width
> the container.
> I've seen someone do this by calculating x/y coordinates for each item. I
> don't really like that idea...
> Help appreciated.
> Thank you,
Thank you robbyk87 but that what I was trying to avoid... Calculations...
Actually, Amy's solution is EXACTLY what I wanted. The flexlib's FlowContainer is perfect for the job.
Already tried it on my current setup and worked out of the box :)
There's some other interesting stuff there.
Thank you so much!