Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TreeView
Message
 
To
24/12/2006 22:20:22
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
SAMBA Server
Database:
MySQL
Miscellaneous
Thread ID:
01180084
Message ID:
01180776
Views:
13
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform