>What I do is that I clear the tree and fill it up again depending on what node was double-clicked. This code is in the dblclick event of the tree:
>Thisform.myTree.Nodes(myNodeIndex).Expanded = .T.
>I've noticed that if the node is the last node from the parent, error occurs.
Hi Charles,
I tested it and didn't find anything strange. But if it bombs on the last node you may add the condition to you DblClick:
IF Thisform.myTree.Nodes(myNodeIndex).Children > 0 && it is a parent node
Thisform.myTree.Nodes(myNodeIndex).Expanded = .T.
ELSE
* do nothing
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