i'm only just learning to use the treeview control, and i need to be able to determine if the node the user just clicked on is a child node. i can't seem to find any property that tells you that. thanks. :)
Printable View
i'm only just learning to use the treeview control, and i need to be able to determine if the node the user just clicked on is a child node. i can't seem to find any property that tells you that. thanks. :)
Use the .Parent property, if the node .Parent is not Nothing then it is a child of something.....
hehe, yeah, i just tried this
VB Code:
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node) If (Node.Parent Is Not Nothing) Then MsgBox Node.Text End If End Sub
but it says "Invalid use of object" :(
was using the Not keyword wrong :o
VB Code:
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node) If Not (Node.Parent Is Nothing) Then MsgBox Node.Text End If End Sub
thanks for the reply :)