[英]flex Multicolumn spark list
I have a list and I would like to move horizontally in a specific number of pixels. 我有一个列表,我想水平移动特定数量的像素。 It would be a list that will display the first 3 items, but when you scroll, only would move one at a time.
这将是一个显示前三个项目的列表,但是当您滚动时,一次只能移动一个。
This is my code: 这是我的代码:
<s:List id="list_recipes" width="100%"
pageScrollingEnabled="true" change="list_recipes_changeHandler(event)"
verticalScrollPolicy="off" horizontalScrollPolicy="on" skinClass="skins.PagedListSkin" contentBackgroundAlpha="0" itemRenderer="renderer.ItemRecipe">
<s:layout>
<s:TileLayout id="layout_recipe" columnWidth="200" useVirtualLayout=""
requestedRowCount="1" requestedColumnCount="-1" rowHeight="260"
horizontalGap="0" verticalGap="0" />
</s:layout>
</s:List>
Thank You 谢谢
In the mousewheel event of the list you can set the delta which will move the list as per your requirement. 在列表的鼠标滚轮事件中,您可以设置增量,该增量将根据您的要求移动列表。
protected function list_recipes_mouseWheelHandler(event:MouseEvent):void
{
event.delta *= 10;
//It will multiply the delta 10 times
//you can use + for addition in place of *
//adjust the value that will suite your requirement
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.