Egore
asked on
Treeview Drag and Drop
I'm using VB 6.0 and am trying to do drag-and-drop with a treeview control. If you look at the folders section in Windows Explorer you'll be able to see what I'm trying to do. Basically, I want the user to click on a node in the treeview control and be able to drag that node over top of another node and move it there by releasing the mouse button. Just like in Windows Explorer. I've done drag-and-drop before so I know the basics of using the Drag, DragOver, and DragDrop methods, I just don't know how to drag a node from a treeview control to another node in the same treeview control.
Please Help.
- Alex
Please Help.
- Alex
i think you need to set a parent node. I have a sample at home I will post tomorrow.
Take a look at this program I wrote awhile back. I think it will do what you are looking for.
http://home.earthlink.net/~jczimmerman/explorerStyleApp.zip
http://home.earthlink.net/~jczimmerman/explorerStyleApp.zip
Try this link:
http://home.earthlink.net/~jczimmerman/ExplorerStyleApp.zip
http://home.earthlink.net/~jczimmerman/ExplorerStyleApp.zip
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Learning
Listening...
ASKER
You all started posting about 5 minutes after I left the office, argh! :) Anyway, I did this a couple years back and Julian K's answer looks right. I will be implementing this tomorrow morning, so I will definately give the thumbs up or thumbs down by noon (EST) tomorrow.
Thanks!
- Alex
Thanks!
- Alex
ASKER
This worked like an absolute charm! I changed the name of the TreeView control and it worked without a hitch, thanks!
- Alex
- Alex