Search the web
Sign In
New User? Sign Up
vbra · Visual Basic - Reliable Answers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Re: preserving object values - WAS - Setting TreeView   Message List  
Reply | Forward Message #34 of 42 |
Just come up with an annoying little problem regarding this when the
original form is closed (destroying the tree in it) it empties my 'global
tree' also

Regards

Nigel


-----Original Message-----
From: Bachmann, Nigel [mailto:nbachmann@...]
Sent: 06 September 2001 14:45
To: 'vbra@yahoogroups.com'
Subject: RE: [VBra] Setting TreeView


As usual I reply to my own question, here's my solution so far - if anyone
can think of a more elegant way........

If global_tv Is Nothing Then
tree_load tv_main
Set global_tv = tv_main

Else
tv_main.Nodes.Clear

For Each nd In global_tv.Nodes
If nd.Parent Is Nothing Then
tv_main.Nodes.Add , , nd.key, nd.Text
Else
tv_main.Nodes.Add nd.Parent.key, tvwChild, nd.key, nd.Text
End If
Next nd


End If

Regards

Nigel



-----Original Message-----
From: Bachmann, Nigel [mailto:nbachmann@...]
Sent: 06 September 2001 13:54
To: 'vbra@yahoogroups.com'
Subject: [VBra] Setting TreeView


I have a complex tree view which is on a number of forms, it takes a while
to populate so I would like to store this information and then 'set'
existing treeview controls to it. Here is a summary of my code:

Public tv as TreeView

Private sub load_form()

if tv is nothing then
load_tree(tv_main)'populates treeview on form
set tv = tv_main ' this appears to work
else
set tv_main = tv ' this falls over
end if


End sub

If I can set tv to tv_main why can't I do the reverse? Any help appreciated

Regards
Nigel



'===========================================================
Archive : http://ReliableAnswers.com/YG/msg?vbra
Files : http://ReliableAnswers.com/YG/files?vbra
Group : http://ReliableAnswers.com/YG/group?vbra
Subscribe : http://ReliableAnswers.com/YG/sub?vbra
Unsubscribe : http://ReliableAnswers.com/YG/unsub?vbra
Attachments : Not Permitted
'===========================================================


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




'===========================================================
Archive : http://ReliableAnswers.com/YG/msg?vbra
Files : http://ReliableAnswers.com/YG/files?vbra
Group : http://ReliableAnswers.com/YG/group?vbra
Subscribe : http://ReliableAnswers.com/YG/sub?vbra
Unsubscribe : http://ReliableAnswers.com/YG/unsub?vbra
Attachments : Not Permitted
'===========================================================


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




Thu Sep 6, 2001 2:26 pm

nbachmann@...
Send Email Send Email

Forward
Message #34 of 42 |
Expand Messages Author Sort by Date

Just come up with an annoying little problem regarding this when the original form is closed (destroying the tree in it) it empties my 'global tree' also ...
Bachmann, Nigel
nbachmann@...
Send Email
Sep 6, 2001
2:32 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help