|
-
Aug 17th, 2001, 04:38 AM
#1
simple treeview question
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.
-
Aug 17th, 2001, 05:12 AM
#2
Fanatic Member
Use the .Parent property, if the node .Parent is not Nothing then it is a child of something.....
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Aug 17th, 2001, 05:13 AM
#3
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"
-
Aug 17th, 2001, 05:20 AM
#4
whoops
was using the Not keyword wrong 
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|