|
-
Nov 23rd, 2002, 06:44 AM
#1
Thread Starter
New Member
how to recursively view all child nodes in a treeview
Hi,
I'm trying to recursively go through all of the child nodes in a tree view upon clicking a button but I'm stuck. Currently, the code below only works for the top nodes in my treeview but I want it to go through each of these nodes' children, and their children and so on.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim child As TreeNode
Dim fullpath As String
For Each child In TreeView1.Nodes
fullpath = child.FullPath
Next
End Sub
If anyone can suggest a solution, or where I'm going wrong I'd be grateful.
Thanks,
Karl
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
|