Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I set the parent property on a node of a treeview
Message
De
12/06/1998 18:03:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/06/1998 16:36:27
Jeroen Naus
Harte-Hanks Europe
Hasselt, Belgique
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00107357
Message ID:
00107756
Vues:
15
>I'm trying to change the parent of a node on a treeview. Foxpro gives me an error doing this. Is there anyone out there that did this and made it work. According to the ACTIVEX Manual this property is setable at runtime.
>
>Command I'm using:
>thisform.treeview.nodes(lcKey).Parent=thisform.treeview.nodes(lcPar)
>also tried:
>thisform.treeview.nodes(lcKey).Parent=thisform.treeview.nodes(lcPar).object
>also tried:
>thisform.treeview.nodes(lcKey).Parent=thisform.treeview.nodes.index(lcPar)
>also tried:
>thisform.treeview.nodes(lcKey).Parent=lcPar
>...
I think the first one should work, but should use the numeric index to another node. Here's from the help:
------------------
Syntax
object.Parent[ = node]

Part Description
object An object expression that evaluates to a Node object.
node A Node object that becomes the parent of the object.

Remarks: At run time, an error occurs if you set this property to an object that creates a loop. For example, you cannot set any Node to become a child Node of its own descendants.
-------------------

Just check that this expression returns .t. :
Type("lcPar")="N" and Between(lcPar,1, thisform.treeview.nodes..count) and lcPar # lcKey

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform