Flex Spark List Mouse Wheel Scrolling Speed

I have a component that extends the sparks list, and when I scroll with the mouse wheel, it scrolls too much at a time. I tried to find a handler that handles scrolling the mouse wheel in the List class and the VerticalLayout class to override, but I cannot find it.

Is there any other way that I have to change, or am I missing something?

+7
source share
2 answers

The delta property MouseEvent.MOUSE_WHEEL determines how many lines will be scrolled using the scroll wheel. You can try changing it in the MOUSE_WHEEL handler (during the capture phase). For example, the following code will scroll line by line:

  protected function init(event:FlexEvent):void { list.addEventListener(MouseEvent.MOUSE_WHEEL, list_mouseWheelHandler, true); } protected function list_mouseWheelHandler(event:MouseEvent):void { event.delta = event.delta > 0 ? 1 : -1; } 

code>

+11
source

The horizontalLineScrollSize and verticalLineScrollSize properties determine how many pixels scroll when the user selects the scroll arrow. The "VerticalLineScrollSize" property also controls the amount of scrolling when using the "mouse wheel". The default value is 5 pixels. The horizontalPageScrollSize and verticalPageScrollSize properties determine how many pixels scroll when the user selects the scroll bar track. The default value is 20 pixels.

More details: http://livedocs.adobe.com/flex/3/html/help.html?content=containers_intro_4.html

0
source

All Articles