S
Sergio Terenas
Hi all,
I've a Treeview control in a form load with 600 nodes. Each node has a text and tag associated to it at the time I add it.
I need to find a node by either the text or the tag, make it the SelectedNode and then make sure it's visible on the tree.
I've been playing with the treeview's properties/methods but I think I got stuck.
Dim aKey As String = txtKey.Text
Dim a As Integer
a = treeview1.Nodes.IndexOfKey(aKey)
If tvApoderados.Nodes.ContainsKey(aKey) Then
MsgBox("yes
Else
MsgBox("No")
End If
BTW, I'm sure the value of txtKey.text exists in the treeview nodes. Could anyone please provide a quick example on how to find/select/show a particular node in VB2005 ?
Thanks,
Sergio Terenas
I've a Treeview control in a form load with 600 nodes. Each node has a text and tag associated to it at the time I add it.
I need to find a node by either the text or the tag, make it the SelectedNode and then make sure it's visible on the tree.
I've been playing with the treeview's properties/methods but I think I got stuck.
Dim aKey As String = txtKey.Text
Dim a As Integer
a = treeview1.Nodes.IndexOfKey(aKey)
If tvApoderados.Nodes.ContainsKey(aKey) Then
MsgBox("yes
Else
MsgBox("No")
End If
BTW, I'm sure the value of txtKey.text exists in the treeview nodes. Could anyone please provide a quick example on how to find/select/show a particular node in VB2005 ?
Thanks,
Sergio Terenas