如何获取视口元素索引

时间:2009-12-05 14:01:52

标签: list flex

我使用flex4 list:

 <component:SmoothScrollingList x="200"
           y="180"
           dataProvider="{myProvider}"
           itemRenderer="myitemdrender.FriendPageItemRender"
           id="friendPageList"
           mouseDown="friendPageList_mouseDownHandler(event)">
    <component:layout>
        <s:HorizontalLayout requestedColumnCount="6"/>
    </component:layout>
 </component:SmoothScrollingList>

如您所见,视口中有6个元素可以看到。

那我怎么知道当前的视口元素索引?

例如:

currentViewPortIndex是:[7][8][9][10][11][12]

据我所知,我只能知道我已经按功能选择的索引

list.selectedIndex

flex4提供了一些我可以使用的其他功能吗?

感谢。

1 个答案:

答案 0 :(得分:0)

HorizontalLayout有一个firstIndexInView属性。

相关问题