Drag gesture to scroll in treeview, while keeping drag and drop functionality


#1

Hi!

I've seen the previous thread about gestures on here, most recently only 3 months ago (http://www.juce.com/forum/topic/gestures-juce), and I know it is a work in progress.

But since I decided I want to try and get scrolling by a dragging gesture in treeviews (meant to be used with touch screens), instead of the current scrollbars (TheVinn, you were right :) ), I thought I'd check on what the current state is.

I've read the code of TreeView and its ContentComponent, and I see that there's also drag'n'drop in there. What complicates things is that I also want drag'n'drop to work! Currently I have a button in my GUI which switches drag'n'drop in TreeViews on and off, otherwise it was too easy to drag'n'drop by mistake. I'd like to be able to keep that as is.

It seems like I should just copy-paste TreeView into my own custom class and start customizing the mouse event listeners in TreeView::ContentComponent. But since that is a bit drastic I thought I'd ask here first!

Has anyone else attempted this with TreeViews? Any tips?

Thanks!