How to address TreeView.node in BeforeCheck

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
User avatar
mssapien
Posts: 23
Joined: Tue Jan 03, 2012 4:39 am

How to address TreeView.node in BeforeCheck

Post by mssapien » Tue Jan 24, 2012 1:09 am

What is the equivalent for $nodeToBeChecked in the code below?$treeview1_BeforeCheck=[System.Windows.Forms.TreeViewCancelEventHandler]{ if($nodeToBeChecked ...){ $_.Cancel = $true # do not want this node to be able to be checked }PS. It is possible to turn on checkbox for only top level nodes in the tree?

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

How to address TreeView.node in BeforeCheck

Post by davidc » Tue Jan 24, 2012 4:00 am

Please refer to the following blog articles for help with the TreeView: Spotlight on the TreeView Control Part 1Spotlight on the TreeView Control Part 2 Nodes at the top level will have its Parent property equal to null. David
David
SAPIEN Technologies, Inc.