Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the count of a collection
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00053257
Message ID:
00053276
Vues:
36
.>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?

Nope. _SCREEN.ActiveForm.TreeView.Nodes.Count shows up in my debugger (has the correct value). Your example doesn't. If it did then we wouldn't be having this conversation.

BTW, It's Saturday. What are you doing working so late?

George
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform