Adding the check boxes in the TREEVIEW in c#

后端 未结 3 1251
不知归路
不知归路 2021-02-18 23:31

i want to add the check box to the child node of a certain parent node in the tree view in my application...How should i add it?

3条回答
  •  不知归路
    2021-02-19 00:24

    The TreeView API only allows you to add/remove checkboxes for EVERY node. If that's what you want, then the answer is easy - use the TreeView's CheckBoxes property.

    If you want a checkbox for a particular node in the tree only, then it gets tricky. .NET doesn't directly support that. You can get the tree to accept it using Win32 message overrides, see the link below for a solution elsewhere:

    http://dotnetfollower.com/wordpress/2011/05/winforms-treeview-hide-checkbox-of-treenode/

提交回复
热议问题