2 Replies Latest reply on Sep 13, 2007 4:33 AM by mikeSibbald

    List doesn't like variableRowHeight with a custom item renderer?

      I have a very basic List:

      <mx:List variableRowHeight="true" width="100%" height="100%" dataProvider="{arr}" itemRenderer="AccTestVBox"></mx:List>

      whose dataProvider is also very basic, just an Object full of random text, some very long, others short. The item renderer is a VBox with some text elements in it:

      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml" dataChange="dataChange();" width="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
      <mx:Text text="{unid}" width="100%" fontWeight="bold"/>
      <mx:Text text="{data.label}" width="100%"/>

      As you can see, I have a dataChange method in there, but it's not necessary here.

      The idea is to replicate the "wordWrap" property of the List element, so that text will wrap, but at the same time, I need to seperate the text values into two seperate elements for design reasons. Obviously, each pair of text needs to be one List Item, hence the item renderer.

      Problem is, once you start scrolling, it gets VERY buggy, some of the text starts to get cut off, and the scroll bar goes whacky, it seems like it doesn't know how to calculate the true height of the list correctly, it seems to readjust itself as you scroll.

      Is this a known issue, or am I not implementing something necessary to make this work?