Page 1 of 1

How to address TreeView.node in BeforeCheck

Posted: Tue Jan 24, 2012 1:09 am
by mssapien
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?

How to address TreeView.node in BeforeCheck

Posted: Tue Jan 24, 2012 4:00 am
by davidc
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