Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TreeView detecting root and child
Message
 
À
02/04/1997 18:40:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00026636
Message ID:
00026690
Vues:
31
>>You can use Node properties Parent, Child, Root, etc., so true value for
>>ISNULL(thisform.myOleTree.SelectedItem.Parent)
>>or
>>ISNULL(thisform.myOleTree.Nodes(1).Parent)
>>means that it is a root node.
>
>So, if I have 3 items which are starting a root, SelectedItem.Parent will returns .T. for them.

Actually, no.
SelectedItem.Parent is an object, and it has the same properties as SelectedItem (like SelectedItem.Parent.Key), so better to check ISNULL(thisform.myOleTree.SelectedItem.Parent)
or
IF TYPE(thisform.myOleTree.SelectedItem.Parent)="O"
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform