Skip navigation
Currently Being Moderated

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

Jun 12, 2007 11:35 AM

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="" 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?
  • Currently Being Moderated
    Aug 8, 2007 11:28 AM   in reply to skinrock
    Hi, I'm having the same issue. I'm trying to get the list to scroll by pixels instead of row height. This is because one row may be larger than the screen and thus you won't be able to view all the text. Did you ever find a solution?
    Mark as:
  • Currently Being Moderated
    Sep 13, 2007 4:33 AM   in reply to skinrock
    Check out the improved List I created:

    It's handling variableRowHeight much better
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)