Drag and Drop into a node of a treeview
-
Hi all, Does anyone know how to determine which node of a treeview control the mouse pointer is over when a drop occurs? Maybe I am asking the wrong question: I want to allow the user to drag something from a listbox control onto a particular node of a tree view so that the dragged object can be added as a child node. Any thoughts? Thanks, Bill
-
Hi all, Does anyone know how to determine which node of a treeview control the mouse pointer is over when a drop occurs? Maybe I am asking the wrong question: I want to allow the user to drag something from a listbox control onto a particular node of a tree view so that the dragged object can be added as a child node. Any thoughts? Thanks, Bill
//Gets the point relative to the treeview Point dragPoint = tv.PointToClient( new Point(e.X, e.Y) ); //Gets the treenode TreeNode target = tv.GetNodeAt( dragPoint.X, dragPoint.Y );
-
//Gets the point relative to the treeview Point dragPoint = tv.PointToClient( new Point(e.X, e.Y) ); //Gets the treenode TreeNode target = tv.GetNodeAt( dragPoint.X, dragPoint.Y );