Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another Treeview question (hopefully the last one)
Message
De
31/10/2001 13:29:09
 
 
À
31/10/2001 12:33:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00575243
Message ID:
00575770
Vues:
29
Hi Cetin,

Thanks for your reply. So if you programatically check or uncheck the checked property the nodechecked event doesn't fire? Then how can we determine if someone checks or unchecks an item?

This is how I set it up. 'MakeLink' is a function I've made to determine if the checkboxed should be checked. 'IsExpanded' is a function that determines if the node was previously expanded.
scan  && scan table full of treeview values
	if empty(tparent)
		loNode = thisform.acxTreeView.nodes.add(, , alltrim(tname), alltrim(tdescrip))
	else
		loNode = thisform.acxTreeView.nodes.add(alltrim(tparent), tnum, alltrim(tname), alltrim(tdescrip))
	endif
	if thisform.makelink(alltrim(thisform.txtPid.value), alltrim(tname))
		loNode.checked = .t.
	endif
	if thisform.isexpanded(alltrim(tname))
		loNode.expanded = .t.
	endif

endscan
Thank You Very Much,
Chris

>Yes Chris,
>It fires when a node is checked or unchecked. It doesn't fire if Checked property is set programmatically.
>ie: I use this code to automatically check-uncheck child nodes of a root node :
>
>*** ActiveX Control Event ***
>Lparameters node
>If node.key = 'Root'
>	llChecked = node.Checked
>	If node.Children > 0
>		Node.Child.Checked = llChecked
>		lnIndex  = Node.Child.Index
>		Do while lnIndex # Node.Child.LastSibling.Index
>			this.Nodes(lnIndex).Next.Checked = llChecked
>			lnIndex = this.Nodes(lnIndex).Next.Index
>		Enddo
>	Endif
>Endif
>
Cetin
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform