Profile Picture

Context Menu and NTreeList

Posted By Vince McMullin 14 Years Ago
Author
Message
Vince McMullin
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)Junior Member (18 reputation)

Group: Forum Members
Last Active: 7 Years Ago
Posts: 18, Visits: 2
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



Threaded View



Similar Topics


Reading This Topic