Drag Drop in explorer layout
Posted on 2007-08-09
Forgive me if this information can be easily found - I have searched but to no avail. I am creating an application that has an explorer layout; that is to say that I have some folders in a tree view control and items in a list view control that are obviously linked. The folder structure and items are stored in a database and I use the explorer style setup to best organise the items.
I have since determined that I need to give users the opportunity to move items from one folder to another. This should be relatively straight forward because there is only one item type. I have attempted to put this together myself and managed to transfer information across from the list view to the tree view on drag drop.
I have not, however, been able to achieve all I would like. For example the tree view doesn't automatically highlight folders for the drag drop as explorer does obviously enabling you to clearly see which folder your items are being dropped to. I tried implementing this by 'selecting' the node that the mouse is currently over but the 'AfterSelect' even fires and I use that to add items to the list view control after the user clicks on a node.....so that caused problems. I've played around with other ways to do this but fear there is a simple solution somewhere out there.
Any help would be appreciated.