Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding nodes to a treeview from a table
Message
De
09/01/2007 16:26:20
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Adding nodes to a treeview from a table
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01183973
Message ID:
01183973
Vues:
63
Any neat code to add the nodes for a treeview using a foxpro table? In this table I have the relative, relation and ckey, so I'd know the order of my treeview.

And where to put this in the form?

Currently I have the code below to add nodes from a table, and I placed it in my form's activate. Is this right?
sele treeview
=tableupdate(.t.)
go top
o = thisform.oletreeview.nodes
o.clear

scan
	if alltrim(crelative) == '0'
		o.add(,1,alltrim(ckey),alltrim(ctext),0)
	else
		o.add(alltrim(crelative),4,alltrim(ckey), alltrim(ctext),0)
	endif
endscan
In my form I have a simple add node button that adds a record to a table. Since I want my treeview to somewhat refresh (get the updated values of my table), I placed the code in the form's activate.

Can you help me refine this code pls?

Thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform