List paddingTop/paddingBottom controls the vertical distance between the itemRenderers ???

Another one of the Flex gotchas…I spent way too much time on this only to have an adobe engineer himself answer this on the flexcoders mailing list:
I had created custom renderers for my list and it looked great. But there was a 2 pixel gap between the renderers that was driving me insane. After my own efforts went nowhere I asked the question on the flexcoders mailing list. The answer, use paddingTop and paddingBottom = 0 in your style. The Flex documentation on the 2 styles says “Number of pixels between the container’s {…} border and the {…} edge of its content area”. This is definitely not something I would read and use that property to manage my item renderers in a list. Ah well, now I know better :).

This tip is going straight to flextips.corank.com, a site dedicated to these weird gotchas and helpful hints. Do check it out and post your own tips there.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s