开发者

Scrolling of List control is misbehaving

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?


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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜