4 Replies Latest reply on Jun 9, 2010 1:38 PM by duder2

    List Size not resizing when itemRenderer resizes itself

    duder2

      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.