If you want to keep the nodes as items, but not visible in the treeview, you can use the following trick i learned by "mistake":
create a second treeview control, which you keep invisible. let it also have the main (root) items.
To make a node unvisible, change it's parent property to the node in the invisible treeview, to show it again, you have to change the parent back.
CHeers
Main Topics
Browse All Topics





by: jackblackPosted on 2002-10-22 at 20:43:23ID: 7358820
Don't add them to the list at all, if it's necessary to keep the data, do so within the form using private variables (with or without property procedures) and/or a class.
I'm assuming that it's always the same nodes that you don't want to display. But even if it's variable, you could just make the variables nodes and populate them as you would normally, just don't add them to the treeview.