flex List Size not updating when itemRenderer resizes itself
Posted
by duder
on Stack Overflow
See other posts from Stack Overflow
or by duder
Published on 2010-06-08T20:18:02Z
Indexed on
2010/06/08
21:02 UTC
Read the original article
Hit count: 307
I've got a list with a custom itemRenderer
that's just a rectangle of specific size.
The list
<s:List id="thelist" width="100%"
dataProvider="{thelistdata}"
itemRenderer="ListItem"
borderVisible="true" />
Note the list's border
is visible to help with debugging
The itemRenderer
<s:Rect id="box" width="50" height="50">
<s:fill>
<s:SolidColor color="blue"/>
</s:fill>
</s:Rect>
When the itemRenderer
receives an event, it changes its size to half
box.width = 25;
box.height = 25;
I see the itemRenderers
are resizing themselves correctly, but the list
itself stays the same size and the border
stays where it is.
Anyone knows how to fix this bug. Basically the list should refresh its size too to fit the smaller boxes.
© Stack Overflow or respective owner