I would like to display a different context menu for each node collection on a NTreeList but I am having trouble figuring out how to do that exactly.
How do I check to see what the NTreeListNodeStringSubItem is equal to and then based on that display the proper context menu for the node collection?
Right now I have something that looks like this but it doesn't work:
Public Sub Quality_Click(ByVal sender As System.Object, ByVal e As MouseEventArgs) Handles NTreeList0.MouseClick
Dim pt As NPoint = New NPoint(e.Location)
Dim node As NTreeListNode = NTreeList0.ItemFromPoint(pt, True)
For i As Integer = 0 To node.SubItems.Count - 1
Dim r As Rectangle = node.SubItems(i).ViewBounds.ToRectangle()
If r.Contains(e.Location) Then
MessageBox.Show(node.SubItems(i).ToString)
Return
End If
Next
End Sub