How to disable a WinForms TreeView node checkbox?

后端 未结 4 729
臣服心动
臣服心动 2020-11-29 08:13

I need to be able to disable some of the checkboxes in a TreeView control of a WinForms application, but there\'s no such functionality built-in to the standard

4条回答
  •  借酒劲吻你
    2020-11-29 08:53

    There is nothing inbuilt to do this. You can use the BeforeCheck event and cancel it for the desired nodes. In case the appearance of the checkbox matters, then you will need to place a image there to show the checkbox disabled.

    This link might be of your interest.

提交回复
热议问题