|
-
Sep 1st, 2000, 06:33 AM
#1
Thread Starter
Lively Member
how do i load everything in a directory into a treeview control.....including the subdirectory and expand everything....like the one win windows explorer
YC Sim
Teenage Programmer
UIN 37903254
-
Sep 1st, 2000, 06:56 AM
#2
Addicted Member
Hi,
This is how I do it! 
Code:
Dim TVX as Node
Dim tvNode as Nodes
Set tvNode = TreeView1.Nodes
'To add a root
Set TVX = tvNode.Add(, , "RootID", "RootText")
'To add a child to the root
Set TVX = tvNode.Add("RootID", tvwChild, "ChildID","ChildName")
You can keep repeating this for as many sub-folders as you want. Just make sure that if you want something to be in a folder, that it's RootID is the same ID as the root that you want it to be under!
Hope this helps
Shaun
Web/Application Developer
VB6 Ent (SP5), Win 2000,SQL Server 2000
-
Sep 1st, 2000, 09:30 AM
#3
Thread Starter
Lively Member
but i dun no the number of parents and sub folders i haf...so bnot easy to keep track the parents and sub folders
YC Sim
Teenage Programmer
UIN 37903254
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
|