Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop nodes on a TreeView from another Treeview?

Status
Not open for further replies.

LucieLastic

Programmer
May 9, 2001
1,694
GB
hi

I have 2 treeviews, one is the 'master' that contains everything and the second is an empty one which I'd like the user to fill by dragging and dropping from the master. But I don't know what to put in the Drop event to add the new node in the user's treeview. I'd also like it so they could specifically add a root node (and all it's children) and/or a child node which would then be added to the node they drop it on.

Any help gratefully received.

lou

 
You need to use the MoveTo procedure of TTreeNode. This does most of the work for you. Check out the Delphi Help for example code showing you how to do it.

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top