Hi Team
When I want to drag from a tree view how do I find out which node I started dragging? The SelectedItem does not work as the previously clicked node is the SelectedItem.
Any Ideas, this must be easy!
Thanks
FW
Printable View
Hi Team
When I want to drag from a tree view how do I find out which node I started dragging? The SelectedItem does not work as the previously clicked node is the SelectedItem.
Any Ideas, this must be easy!
Thanks
FW
Does this work for you in the MouseDown event?
Dim otvwNode As MSComctlLib.Node
Set otvwNode = MyTreeview.HitTest(X, Y)
Thank ML the problem with this is is causes and error if the user clicks on the + or - in the tree. I can get around this with
But I hoped ther would be a tidyer solution.VB Code:
If Not tvwCostCentres.HitTest(x, y) Is Nothing Then strSelectedNodeKey = tvwCostCentres.HitTest(x, y).Key End If
FW