try this. it's a recursive search:
vb Code:
Private Sub SearchTree(ByVal startNode As TreeNode, ByVal sSearchString As String) If startNode.Text.Contains(sSearchString) Then startNode.ForeColor = Color.Red Else startNode.ForeColor = Color.Black End If For Each n As TreeNode In startNode.Nodes SearchTree(n, sSearchString) Next End Sub




Reply With Quote