How to draw treeview node +/- buttons outside the tree?

Like the class ButtonRenderer, I want all the buttons to TreeViewNodesbe able to completely paint +/- in any instance TreeView. This doesn't seem to be a method ControlPaint, and drawing a button looks wrong. Where can I get the drawing code for the node tree from?

+3
source share
1 answer

You can draw most of the standard Windows controls using the Visual Styles API .

I did not try to visualize the tree view control, but check out the .NET class VisualStyleRendererthat appears to wrap all the functionality of the unmanaged API.

+1
source

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


All Articles