--- In flexcoders@yahoogroups.com, "Alexander" <alexander.far...@...> wrote: > > Thanks, I don't have warning anymore after I've changed the code. > > The horizontal scrolling issue seems to be a Flex 3 bug: > when I change the width and height, so that there is only > a vertical scrollbar - then everything starts to work ok.
It is quite possible and even likely for set data() to be called before your label exists. I don't really want to take the time to teach you about the right way to deal with the component lifecycle, but you can easily learn about it through googling. However, there is no need for you to even be writing a custom itemRenderer in this instance. Look at TileList_withStyle at flexdiary.blogspot.com, and use the styleFunction to pass back an object with the appropriate style properties. Use "mx.controls.Label" in the itemRenderer field of the TileList_withStyle. Then use "label" in the labelField property. That way you can accomplish this without having to worry about the component lifestyle and you can avoid the extra weight of an itemRenderer based on Canvas. HTH; Amy