简体   繁体   中英

FLEX - Disable mousescroll for scrollbars?

I'm looking for a way to disable the scrolling of the vertical and horizontal scrollbars when scrolling the mouse.

I use the mouse scroll to zoom in and out, and I don't want the scrollbars to scroll while scrolling the mouse wheel.. (But I do need the scrollbars to be visible).

Any way to do this?

Thanks in advance!

try the following one i am not sure but it might be work.

I am modifying the code its a bit of cheat with the code so i am not sure that i will work but just try this one.

[DivideBoxID].addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);


public function mouseWheelHandler():void
{
    //Leave this space blank..  
}
[DivideBoxID].addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);

public function mouseWheelHandler():void
{
    e.stopImmediatePropagation(); 
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM