>>The Nodes collection will return a reference to a node from the key value, but not from Fullpath. For that, you'd have to walk through the collection, which I'd avoid if possible <s>.
>
>OK. Does the nodes collection contain ALL the nodes in the entire treeview? For some reason I thought a node had a nodes collection as well (that contained any nodes below it and so on). I doesn't appear to in the help. I'll play around with it and figure it out.
>
>Thanks.
nodes is a property of treeview itself and refer to 'all' nodes. A node object has Child, firstsibling, lastsibling, next, previous, parent, root properties in turn (clever as fox:) Below is a code portion listing children nodes in edit1 :
WITH this
.DropHighlight = .null.
If node.Children > 0
thisform.Edit1.Value = "Current childs of this node :" + chr(13) + ;
"-----------------------------" + chr(13) + ;
Node.Child.Text
lnIndex = Node.Child.Index
do while lnIndex # Node.Child.LastSibling.Index
thisform.Edit1.Value = thisform.Edit1.Value + chr(13) + ;
.Nodes(lnIndex).Next.Text
lnIndex = .Nodes(lnIndex).Next.Index
enddo
EndIf
ENDWITH
Good thing index is not fixed vs key. OTOH if you have say a thousand children < g > and don't know the keys finding 999th is not very fast.
You're right documentation says nodes apply to node also. It also says node object has an Item property. Honestly I couldn't make both of them work up to date.
Cetin