How do I make a TreeNode not visible? (C#)

.net, c#, c#-2.0, treenode, winforms

Solution

I don't think you can do that. There is an `IsVisible` property, but it is readonly and will indicate whether the node is currently visible within the client area of the `TreeView` control. I think you will need to remove it from the nodes collection in which it resides (and optionally remember the position of it to be able to restore it.

Problem

There is probably a really straightforward answer to this but I'm having difficulty finding it. Simple, I have a TreeNode and I would like to make its visibility false. (or another way of not allowing it to be shown until required). Edit - Another Question? I'm confused as to how there isn't a Visible attribute but then there is the property: ``` Node.PrevVisibleNode; ``` What is the difference between this and `Node.PrevNode`? Thanks,

Original source