Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Order of nodes in Treeview
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00530418
Message ID:
00531005
Vues:
12
This message has been marked as a message which has helped to the initial question of the thread.
>Hello,
>
>I'm using the Treeview control (6) and I run into some problems when I need to change the order of nodes. What I'm doing now is, when the order needs to be changed, I reload the complete tree. but this can take quite some time when the number of nodes is high.
>Can I add nodes before/after a specific node?
>
>Thanks for your help in advance!
* First, the existing node must be removed:
oForm.oTree.nodes.Remove(lcNodeKey)
* Then it must be (re)added Ex:
oForm.oTree.Nodes.Add;(lcRelativeKey,lnRelationshiptorelativekey,lcDestinationKey,lcDestinationText,,)

It may be necessary to determine things like whether a parent node needs to be created. If this node is the first child node, or where the re-add fits into a seqence of "child" nodes.

You can use VARTYPE() and FindItem to determine if elements of your TreeView already exist.
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform