Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TreeView
Message
 
À
24/12/2006 22:20:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
SAMBA Server
Database:
MySQL
Divers
Thread ID:
01180084
Message ID:
01180776
Vues:
14
>How to tell whether a node is exist?
>I try
>VARTYPE(THISFORM.oleControl1.Nodes('AR3'))
>
>but give me error message :
>OLE IDispatch exception code 0 from Nodes: Element not found...
>
>
>TIA and merry x'mas.

The other suggestions are good
One way is to check for the existence of the node's data record in a table - if it is in the table - it must be in the tree view.

I have never used the PEMSTATUS (it looks cool) - but I have used the object test with both VARTYPE and TYPE and found it was more reliable to test the nodes key property for a "C" data type.
IF TYPE('myform.myTV.Nodes([AR3]).key')==[C]

You can also test to see if the selected node is a child node:
IF TYPE('myform.myTV.Nodes([AR3]).Parent.key')==[C]
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform