Help with form.treeview control?

  • Thread starter Thread starter rhaazy
  • Start date Start date
R

rhaazy

Using C#

I want to know if it is possible to limit the user to only being able
to see the path of the current node.

In other words I dont wan't the user to be able to see any expanded
stuff that isn't part of the path of the selected node.

So I need some kind of function that will CollapseAll() except the part
of the tree the user is currently working with...

If this is possible does anyone have any ideas to point me in the right
dirrection?

Thanks.
 
TreeNode objNode = (TreeNode)e.Node;
treeView1.CollapseAll();
if (!objNode.IsExpanded)
{
objNode.EnsureVisible();
}

Figured it out, pretty simple, thanks anyway
 
Back
Top