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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to clear the children of a tree node

Status
Not open for further replies.

cal555

Programmer
May 5, 2006
71
US
Hi,

I have a tree that has topics, so for example in the following:

Aouto type
Car
Suv
Sports car
Van
Truck
Motor cycle
Aircraft
Helo
Jet
Plain

I notice that If I colllaps a level it still is retaining the children structor in memory, where the first time through it builds them.
I need that if I collapse the car node it to totaly clears its children and rebuilds them again on expansion. Is there a tree function or something that would do this? I think the answer is in using Tree.Nodes.Remove some how, but I am not sure how I would use it here.

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top