How does one go about making tree items draggable? I want to show a directory structure in a treeview and have it be possible to drag a directory to a different drop target.
I have a listview which is happily allowing me to drag items, and a second which is receiving them. I’m just stumped with the tree view.
AFAICT I need to assign a custom component for the tree item with createItemComponent. I should then be able to override the mousehandling stuff for the component, right? This doesn’t appear to be working though.
I’m sure this is easy, but I’m totally missing it. :roll:
Well it appears in my case that the custom component isn’t receiving any mouse interaction.
I may be doing something silly with multiple inheritence[1] here though. I have my tree item inheriting from both TreeViewItem and Component. Is this why it is breaking? Also Is this actually legal, or will the tree attempt to dispose of the custom component after already disposing of the treeviewitem?
[1] bear with me, I’m more of an ‘interfaces’ man at the moment.