TreeView: How do I allow scrolling beyond all TreeViewItems, to blank space at bottom for pasting?

Hi!

This is common behavior in applications I’ve used, but I’m not sure how to implement it in JUCE:

I use TreeViews where users can edit (cut/copy/paste etc) items in the TreeView.

This far I’ve gotten all functionality as I like it, but haven’t figured out this last one:

How do I allow scrolling beyond all TreeViewItems, to blank space at bottom for pasting?

So, how would I allow scrolling beyond the bottom TreeViewItem in the tree to the left, so that the user can right-click to paste below it, into the “root TreeViewItem” so to speak?

Reading through the code of TreeViewItem, TreeView, Viewport, I see that… there’s no easy way of doing this :slight_smile:
A custom blank-looking subclass of TreeViewItem, which is always kept at the end of the Root Item’s children, and forwards any mouse events to the root item, sounds like a workable solution… I try that…