>Hi all!
>
>How do you determine if a particular node is the root (top most level/parent), child, etc.
Charles, you can use your node Parent and Children properties for that.
Say,
IF ISNULL(thisform.oletree.nodes(mynodekey).parent)
* it is a root node as it has no parent
ENDIF
IF !ISNULL(thisform.oletree.nodes(mynodekey).parent)
*this node has parent, now check if it has children
IF thisform.oletree.nodes(mynodekey).children > 0
* this node is a parent as it has children
ELSE
* this is a child node only
ENDIF
ENDIF
You can also check if the node with particular mynodekey is a root node this way:
IF thisform.oletree.nodes(mynodekey).root.key = mynodekey
* it is a root node
ENDIF
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