Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DOEVENTS needed to show the current item
Message
 
À
19/04/2004 13:04:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00896009
Message ID:
00896315
Vues:
32
This message has been marked as the solution to the initial question of the thread.
>>It is suggested that in the nodeclick event, the Selected property needs to be set TRUE.
>>
>>
>>procedure NodeClick(Node)
>>Node.Selected=.t.
>>
>
>Thanks, I'll keep that in mind.
>
>>I also note you are using indexes. Look at the cKey propoerty. It can be trelated to a key field in a table. The index property can change.
>
>What I have at the end of the treeview BuildMap() code is the following:
>
>
>* Select the first item
>ThisForm.oTree.Nodes(3).Selected=.T.
>
>ThisForm.oTree.Left=35
>
>* Put the focus in the tree control
>ThisForm.oTree.SetFocus()
>
>* Force a refresh
>ThisForm.ShowInfo(ThisForm.oTree.Nodes(3).Key,3)
>
>
>As you can see, I am using the Key for passing the ID to the ShowInfo() method. That method displays the related treeview item record info at the bottom of the treeview.
*If we can assume everytime a node is clicked, the ShowInfo method
*fires, then it could be imbedded in the NodeClick event.

* Node click event in treeview
procedure NodeClick(node)
if this.tag#node.key &&prevents double firing for same node
   this.tag=node.key
   node.selected=.t.
   ThisForm.ShowInfo(Node.Key,3)
else
endif
endproc

* Then, when it's needed to fire for Nodes(3), make the call this way:
thisform.oTree.NodeClick(ThisForm.oTree.Nodes(3))
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform