I wanted to use a scrollview container for my project, but I want to disable mouse scrolling on the container, only drag. I was thinking about making a remix of the original scrollview code, but I want an easier solution. I tried using unregisterEvent() to maybe unregister the scrolling event in the scrollview, but it only allows UIEvents unlike its openfl counterpart.
How would I do this?
Can you expand a little more? Im not 100% sure i follow, i dont really understand what
I want to disable mouse scrolling on the container, only drag
Do you mean you want to disable the “click on content and drag” it? In which scrollMode
is what you are after (possible values are “normal”, “drag”, “inertial” - defaults to drag)
Or are you saying you want to disable scrolling via the scrollbars, in which case you could hide them using css or use the special style “mode:mobile”
Or are you saying you want to disable the mouse wheel, in which case capturing the event and cancelling it should work… … … ?
Cheers,
Ian
I just wanted to disable the mouse scroll event.
Im sorry, but im still not understanding, what is the “mouse scroll event”… do you mean the “mouse wheel event”?