Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TreeView Error
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00355505
Message ID:
00355603
Views:
15
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform