I have a System.Windows.Forms.TreeView control for which I would like to turn off the plus/minus sign for specific child TreeNode objects. I know I can do this at the entire TreeView level using the TreeView.ShowPlusMinus property, but I’m wondering if I can hide the signs only for selected TreeNode objects.
I have a System.Windows.Forms.TreeView control for which I would like to turn off the
Share
Alas, the Windows Forms TreeView class wraps the native tree view control, and that control only supports showing or hiding the plus/minus signs globally.
That’s because, internally, that flag maps to the TVS_HASBUTTONS control style, which of course affects the whole control and not individual items.
To my knowledge, the only way to achieve what you want is to handle the DrawNode event and render everything yourself.