Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a root node to a treeview..
Message
De
23/11/2006 06:11:33
 
 
À
22/11/2006 20:41:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01171970
Message ID:
01172011
Vues:
15
I have a blank treeview at first run. I have a button for the add nodes that simply adds node to treeview. I've actually made use of the treeview sample of VFP 6.0.

Here is some explanation about how to add nodes to the TreeeView from MegaFox: 1002 Things You Wanted to Know About Extending VFP:

How are nodes added to the TreeView?

You add a Node to the TreeView using the Add() method of its Nodes collection but, because of the hierarchical nature of the TreeView, the syntax is a little different from that used to add items to the ListView and the ImageCombo. When you add a Node, you also need to specify the relationship that it has to other Nodes in the collection. So the syntax for adding a Node is
oTree.Nodes.Add( relative, relationship, key, text, image, selectedimage)
where Relative is either the Index or the Key of an existing Node. To add a node at the top level of the hierarchy, do not pass the relative parameter. The Relationship between the newly added Node and this existing Node can be

0-tvwFirst: The new Node is positioned before all the Nodes at the same level of the hierarchy as the Node referenced by the Relative argument

1-tvwLast: The new Node is positioned after all the Nodes at the same level of the hierarchy as the Node referenced by the Relative argument

2-tvwNext: (Default) The new Node is positioned after the Relative Node as a sibling Node

3-tvwPrevious: The new Node is positioned before the Relative Node as a sibling Node

4-tvwChild: The new Node is added as a child to the Relative’s Nodes collection

If no Relative Node is specified, the newly created Node is added at the end of the top level of the hierarchy. The Add() method returns an object reference to the newly created Node.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform