Extracting Relative Propert of TreeView Node

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know tha the properties of a TreeView node are as seen below:

TreeView1.Add(Relative, Relationship, Key, Text)

How do I extract the Relative Property if I know the Text Property? That is
I know a specific node has a text property of "X". I want to use this to
identify the node and back out the relative property.

Thanks

EM
 
The Relative argument only makes sense when adding nodes and if you are
adding nodes then you will know
what the Relative is you are adding to, so I don't quite understand the
question.

Maybe this will get you on the right track.

Sub test()

Dim oNode As Node

For Each oNode In MainForm.TreeView1.Nodes
If oNode.Text = "testing" Then
MsgBox oNode.Previous Is Nothing, , "child node?"
Exit For
End If
Next oNode

End Sub


RBS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top