Saturday, March 6, 2010

Overlapping Flex Repeater

The repeater control in Flex appears easy enough to use. Any tutorial you read will tell you just to create a repeater control and place whatever other control you want repeated inside of the repeater, whether it be a label, a list, or a strange custom control that you have designed on your own. Next the tutorial will tell you to click ‘Run’ and you will see a webpage with the layout you expected. The tutorial will display an image will a nice list on it, but when you look at your screen, you will see one line, with what looks like eight words overlapping each other.

The easy way to fix this problem is to wrap the repeater control with a VBox control, click ‘Run’, and everything will be the way it is supposed to be.

I have no idea why the repeater does not have this functionality built into, since most of the time I do not think you would want an entire collection of objects overlapping,, but maybe I am wrong.