Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving A TreeView Node
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
01036288
Message ID:
01036687
Views:
16
Martín,

Just a follow up, I just tested and the error I get is:

OLE IDispatch exception code 0 from ListImages: Invalid Key (Error 1428)

You'll get the error if Image or SelectedImage are .Null., so the work-around would be to use something like
.Nodes.Remove(loNode.Key)
.Nodes.Add(lcNewRelation, lnRelationShip, loNode.Key, loNode.Text, Nvl(loNode.Image, 0), nvl(loNode.SelectedImage, 0))
And that'll work (With the before mentioned problem that the sub-tree of the node is lost and must be rebuilt)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform