Search code examples
apache-flexactionscript-3flex3horizontallist

Centering item renderers in a HorizontalList


I am trying to center itemRenderers in a horizontal list if the number of items in the list is less than the maximum visible number. Has anyone found a good way to do this?

See an illustration of what I mean if it is hard to picture.

Thanks!


Solution

  • Override the measure() method - I've writen a blog entry here: http://flexmonkey.blogspot.com/2010/05/centre-aligned-horizontallist-in-flex.html

    simon