|
-
May 1st, 2000, 03:46 PM
#1
Thread Starter
Hyperactive Member
Hola peeps,
Is it possible to instanciate a treeview nodes collection externally from the actual control, build up the tree and then use something like:
Set TreeView1.Nodes = MyNodes
to display it?
I can't think of any way other than to use a second 'invisible' treeview control?
Anyone?
(I guess I want to be able to add whoel nodes to a treeview without having to create all the sub-nodes...I want to store my nodes so I don't have to do a complete refresh of my tree-view every time something changes...)

Dan
[Edited by Judd on 05-02-2000 at 06:02 AM]
-
May 1st, 2000, 05:38 PM
#2
Thread Starter
Hyperactive Member
Anyone know why this doesn't work....
I thought this might solve the above problem, but apparently not.
I can't believe there is no way to add complete nodes to a tree....it seems like an obvious thing to want to do
Code:
Private Sub Form_Load()
Dim tvw As Object
Dim nde As Node
Dim nde2 As Node
Set tvw = CreateObject("MSComctlLib.TreeCtrl")
With tvw
Set nde = .Nodes.Add(, , "ROOT", "Root Node")
Set nde = .Nodes.Add("ROOT", tvwChild, "CHILD1", "Child One")
Set nde = .Nodes.Add("ROOT", tvwChild, "CHILD2", "Child Two")
End With
Set nde = tvw.Nodes("ROOT")
Set nde2 = TreeView1.Nodes.Add(, , "R", "Tv1 Root")
Set nde.Parent = TreeView1.Nodes("R")
End Sub
-
May 1st, 2000, 08:08 PM
#3
Thread Starter
Hyperactive Member
Hehehehe....just to get this back to the top of the forum ;o)
-
May 1st, 2000, 09:30 PM
#4
Thread Starter
Hyperactive Member
Once more unto the top dear friends, once more...
Can I copy a node from one treeview to another or not?
-
May 2nd, 2000, 03:31 PM
#5
Thread Starter
Hyperactive Member
I wondering if I should've titled this thread 'Horny Chicks' or something....
Where are the gurus and hyperactive members when you need them?
-
May 2nd, 2000, 09:50 PM
#6
Thread Starter
Hyperactive Member
I think nobody likes TreeView except me...
-
May 2nd, 2000, 09:54 PM
#7
There's no direct way to copy everything from TreeView to another with one line of code. You would have to manually loop through nodes collection in one TreeView and populate another. If you need help on coding, just let me know.
-
May 2nd, 2000, 10:02 PM
#8
Thread Starter
Hyperactive Member
Thanks Serge..
I had figured that there wasn't a way around the problem (which, frankly, is just sh*t on the part of the MS originators!).
As I mentioned elsewhere (Persistance Is Futile) my preferred route is using an invisible Tree to store my nodes and transfer them as and when to the visible tree (so I don't have to load them every time....)
I'll be sure to give you a shout though, should I get stuck again..
Cheers,
Dan
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
|