How can I manage checkboxes in .Net Forms.TreeView?

I have a .NET desktop application with TreeView as one of the interface elements.

I want to be able to repeatedly select this TreeView, only one that is not supported at all.

So, I am adding flags to the tree. My problem is that only some elements are available, and those that cannot, cannot cascade sequentially.

Is there a way to disable or hide some checkboxes while others are displayed?

+3
source share
3 answers

The default behavior of a TreeView is that if the Checkboxes property is set to true, these flags will be shown for all TreeNodes.

, - , - . TreeView TreeNode, . , , - TreeView. StateImageList. , :

+4

, . TreeNode BackColor, node. SelectionChanged, Shift/Control, , node / . Generic::List<> , .

+1

MultiSelectTreeView :

Why doesn't .NET have a multi-element tree? There are so many uses for one, and including flags in a tree structure is a pretty disgusting alternative.

0
source

Source: https://habr.com/ru/post/1696631/


All Articles