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

>Thanks for your reply. I tried it and it worked. I also put the expanded property to good use also. But I have another question now. (Sorry I am currently using VFP 5 - there is no object browser - ordered VFP 7 yesterday though) How does the nodecheck event work? Shouldn't it fire if the user clicks on a checkboxe? I think it was behaving that way earlier, but now nothing happens. (I put in messagebox('hello') in the nodecheck event, but when you check it at run time nothing happens)
>
>Thanks,
>Chris
>
>>>Hi,
>>>
>>>When I'm initializing a treeview control (with checkboxes set to .t.) is there any ways I can make certain check boxes appear with check marks while others do not?
>>>
>>>Thanks,
>>>Chris
>>
>>Yes, when you add a node get a refrence to it like this:
>>
>>loNode = Thisform.oleTreeView.Nodes.Add(,,,,)
>>*add the checkmark
>>loNode.Checked = .T.
>>
>>Or you can do this.
>>Thisform.oleTreeView.Nodes(i).Checked = .T.
>>
>>FYI: You can also do the same with the Node Objects "Expanded" property to automatically expand a branch.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform