Tree View Control

abidshahzad4u

Registered User.
Local time
Today, 08:32
Joined
Aug 17, 2009
Messages
15
Hi

I have added a tree view control to one form. And I want to populate it from the table. But the problem is that I don't know in advance that how much nesting will be there in the table. Mean a category have sub-categories, then sub-categories upto n level.

I have done promgramming in C# but never in VBA or VB, so I am facing syntax issues.

How can I develop a recursive functions for this issue?
 
I wouldn't use recursion.
I would handle the Expand event of the TreeView object and determine if the expanded node should have children. If so--and if they haven't already been created--create them. This way you build the tree incrementally and you only create the nodes the user has specifically requested.
 
Thanks
I have developed a recrusive function which includes all the sub level chiclds (up to n).
Now the problem is that I want that root node must appear with + sing to its left for expansion. Now the root node open with sub nodes.
 

Users who are viewing this thread

Back
Top Bottom