Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save TreeView

Status
Not open for further replies.

macl

Programmer
Sep 15, 2004
65
DE
Hi everybody i have a problem
I have a treeview and a combobox
the combobox contains 3 items, say Root1, Root2, Root3 niow if the user chooses Root2 then the nodes to the Root2 are build up in the treebview.
Now, the problem is to build up all the nodes takes really long and therefore if the user switches often beetween the Roots it takes far to long
Now i would look for something, that once say Root2 is build up and the user chooses Root3 then the Root2 should be saved in some way so that if the user again chooses Root2 then the Nodes dont need to be build up again but just put back into view
I already thought about using 3 differen treeviews and setting them invisible/visible but thats not working in this case as the whole programme would have to be changed and that would take me weeks to do so if somebody knows a different way that would be really wonderfull
thanks so very much :)
 
Hi,

Could you not have all of the items (Root 1, Root 2 and Root 3) populated and collapsed in the Treeview on Form_Load and do away with the combobox???

The user could then select the the item and you could programatically collapse any other open nodes??

Don't know if that's practical for you but it would definately save time in the switching between nodes.

Hope this helps.

Harleyquinn
 
thats the problem they dont want it that way you said
I had it that way first but then different filters were added to the different roots which made the users get mixed up if all three roots stayed displayed in the treeview
so we came up with the combobox but that makes it very slow unless we can save the roots once they are build up
 
Hi,

Righto, i understand what you mean about users geting confused.

How are you building up the roots??

Harleyquinn
 
if the user chooses a item in the combobox then i say
Set nodeX = frmMain.treeview.Nodes.Add(, , "Key Root1", "Root1")
nodeX.Tag = "R1"
nodeX.Sorted = True
and then i use a nother function to create the childs to the rootnode
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top