VB6 - Treeview Control - Moving Nodes from one Treeview to another

VB6 - Treeview Control - Moving Nodes from one Treeview to another

Post by bcummins » Wed, 21 Feb 2007 15:18:08


Thanks for reading my post. I am attempting to enable users to move
nodes from one treeview to another and then do an update from the
nodes in the destination treeview. Anyway, the user would like to
select nodes at any level and have them placed in the appropriate
location on the second treeview accordingly. I kind of have it
working but it is buggy and it seems I have made it more difficult
than it should be. I can post my code if needed. Please if you have
any good examples I would greatly appreciate it.
Thanks
 
 
 

VB6 - Treeview Control - Moving Nodes from one Treeview to another

Post by Ken Halte » Thu, 22 Feb 2007 02:28:07


PlanetSourceCode has quite a few TreeView samples. This one may help

Copy TreeView Node
http://www.yqcomputer.com/

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.yqcomputer.com/

 
 
 

VB6 - Treeview Control - Moving Nodes from one Treeview to another

Post by Mike » Thu, 22 Feb 2007 06:24:07


Impossible to tell if you're doing things badly or making it more difficult
than it has to be without seeing your code <g>

Basically, you need to loop through all levels of child nodes of the
"parent" node to be moved, adding all of these to the 2nd treeview. Then
you need to remove that parent node (and its children) from the original
treeview.

--
Mike
Microsoft MVP Visual Basic
 
 
 

VB6 - Treeview Control - Moving Nodes from one Treeview to another

Post by bcummins » Thu, 22 Feb 2007 14:02:33

On Feb 20, 9:28 am, "Ken Halter"




The link provided exactly what I was looking for! Thanks you very
much!!!