|
-
Jul 23rd, 1999, 08:48 PM
#1
Can someone please tell me how to have multiple "roots" in a treeview. I have seen this in other programs but can't figure out how to do it.
I need a database where employees can add files to any of ten default categories or "roots" that cannot be changed or deleted by the employes.
Please help if you can. I've been on vacation and am really behind in this project.
Many thanks!
Jaxon
-
Jul 24th, 1999, 01:28 AM
#2
Member
Sub SetUpTree()
Dim mNode As Node
tvwMain.Style = tvwTreelinesPlusMinusPictureText
' Root 1 & children
Set mNode = tvwMain.Nodes.Add(, , "Root1", "Root1")
Set mNode = tvwMain.Nodes.Add("Root1", tvwChild, "Child 1 1", "Child 1 1")
Set mNode = tvwMain.Nodes.Add("Root1", tvwChild, "Child 1 2", "Child 1 2")
Set mNode = tvwMain.Nodes.Add("Root1", tvwChild, "Child 1 3", "Child 1 3")
' Root 2 & children
Set mNode = tvwMain.Nodes.Add(, , "Root2", "Root2")
Set mNode = tvwMain.Nodes.Add("Root2", tvwChild, "Child 2 1", "Child 2 1")
Set mNode = tvwMain.Nodes.Add("Root2", tvwChild, "Child 2 2", "Child 2 2")
Set mNode = tvwMain.Nodes.Add("Root2", tvwChild, "Child 2 3", "Child 2 3")
' Root 3 & children
Set mNode = tvwMain.Nodes.Add(, , "Root3", "Root3")
Set mNode = tvwMain.Nodes.Add("Root3", tvwChild, "Child 3 1", "Child 3 1")
Set mNode = tvwMain.Nodes.Add("Root3", tvwChild, "Child 3 2", "Child 3 2")
Set mNode = tvwMain.Nodes.Add("Root3", tvwChild, "Child 3 3", "Child 3 3")
End Sub
-
Jul 24th, 1999, 03:48 AM
#3
Alfred -
Thanks for the code. I'll get to work on it
Monday and let you know by email how I did with it. Thanks again. I'm learning more from you guys than from my teachers and many books!
jaxon
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
|