Disabling a ScrollView's scroll


Is it possible to disable a ScrollView’s scroll after a mouse down event, and re-enable it on a mouse up? The drag scroll, specifically – I was trying to add a way to drag items on a tree view, but it seems like you can’t take its focus away once you click and hold, and disabling the entire view with a mouse down event doesn’t stop its scrolling until you release it. (Somewhat related, draggable items don’t seem to work under ScrollView either, getting cropped or locked into place: Builder - HaxeUI )

I figured I could either lock vscrollpos or modify ScrollView directly/extend it to add the option to disable it, but I wanted to know if there’s already a proper or better way to do this that I overlooked/didn’t think of.

I am using the latest haxe and haxeui libraries, by the way.


You should be able to cancel an event to achieve what you are after, im just not sure what even, and when. I dont think disabling the view is the right way to go since that can change what the view looks like, which is seems wrong / weird for something like drag - thanks for the example, ill check it out.