Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another Treeview question (hopefully the last one)
Message
From
31/10/2001 13:29:09
 
 
To
31/10/2001 12:33:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00575243
Message ID:
00575770
Views:
30
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
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform