Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the count of a collection
Message
From
04/10/1997 18:59:09
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00053257
Message ID:
00053275
Views:
30
>BTW, I'd agree with you about having access (no pun intended, despite my reputation) to the number of children if the .Nodes collection was recursively defined. Apparently, it isn't. If it was, you could access the total number of children via:
>
>ThisForm.TreeView.Nodes(lnindex).Nodes.Count
>
>The only other property that might apply is .Children, but that only returns the number of immediate children, and doesn't include children of children. You might be able to get that with a recursive function.

Ok, it might well the case. I thought the naming collection was done automatically. So, it might be normal I get an error when I try this. But, as you say, if it is only the immediate children then I will be better with what I have right now.

BTW, isn't the syntax ThisForm.TreeView.Nodes(lnindex).Count instead?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform