My tree is a menu with the parents the different applications (AR, AP,
GL, etc), under each application could be another sub-menu (code file,
reports), or an actual selectable field (customer file).
So, i open AR (by clicking on the plus icon), left-click on customer
file once (so it is highlighted in blue) then right click and select my
menu option. The node that comes back from the cursor position is an
application that is 10 applications down in the list from AR.
Private Sub mAddtoFavorites_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles mAddtoFavorites.Click
Dim hti As TreeViewHitTestInfo = trMenu.HitTest(Cursor.Position)
ShowMessage(DRStr(Cursor.Position.X) & " - " & DRStr(Cursor.Position.Y))
If hti.Node Is Nothing Then
Else
Dim xnode As TreeNode
xnode = CType(hti.Node, TreeNode)
ShowMessage(xnode.Text)
End If
End Sub
The customer file that is highlighted is the third one down:
AR
[+] code file
|- Customer File
Darin
*** Sent via Developersdex http://www.developersdex.com ***