0
votes

I am having this very weird behavior with a mx:List control not scrolling properly.

Here is a snippet:

<mx:List itemRenderer="customerRender" x="19" y="257" height="68" width="290" id="orderStatusHistoryList" color="#CCCCCC"  rowHeight="35" ></mx:List>

The custom render creates a vBox that is 35 pixels high with some labels in it.

Now, my dataProvider, set in the script block, is returning 3 items for the list (say item1, item2 and item3). Because of the height of the list control, only 2 are shown initially. Now for the weird part, when I scroll down the list to see the next item it is all messed up.

Maybe this will give you a better idea of what is happening.

Initial display: Item 1 Item 2

Display after clicking the scroll down button: Item 2 (expected) Item 1 (What the ?, this should be item 3)

Display after click the scroll down button one more time: Item 1 (all wrong)

Now, if I increase the height of the list control, so it has enough room to display all three items, it displays fine. Also, I put a trace statement is the item render and flex is rendering all three items with the correct data.

Please tell me, what the heck is happening here? Anyone else seem weird scroll behavior like this?

1
can you send a screen shot of this.. maybe you lack validateNow() and invalidateDisplayList() to your listcontrol upon scrolling down and upTreby
I didn't extend the List component, just used a custom render. This smooth scrolling component has fixed the issue. I also read that flex 4 will have much better scrolling out of the box.Ryan C

1 Answers

0
votes

Solved it .. kind of ... I implemented the following custom control:

http://blogs.adobe.com/aharui/2008/03/smooth_scrolling_list.html