Posted By

CaptainProton on 03/01/10


Tagged

TreeView find nodes


Versions (?)

getNodeByKey(String, Object) As Node


 / Published in: Visual Basic
 

This method returns a TreeView node based on its key.

  1. Private Function getNodeByKey(key As String, treeView_ As Object) As Node
  2. Dim i As Long
  3.  
  4. For i = 1 To treeView_.Nodes.count
  5. If (treeView_.Nodes(i).key = key) Then
  6. Set getNodeByKey = treeView_.Nodes(i)
  7. Exit Function
  8. End If
  9. Next i
  10.  
  11. Set getNodeByKey = Nothing
  12. End Function

Report this snippet  

You need to login to post a comment.