开发者

How do I paint the treeview node +/- buttons outside a treeview?

开发者 https://www.devze.com 2022-12-22 02:18 出处:网络
Similar to the ButtonRenderer class, I want to be able to paint the +/- buttons used in TreeViewNodes completely separately to any instance of a TreeView. There doesn\'t seem to be a ControlPaint meth

Similar to the ButtonRenderer class, I want to be able to paint the +/- buttons used in TreeViewNodes completely separately to any instance of a TreeView. There doesn't seem to be a ControlPaint method that do开发者_运维知识库es it, and drawing a Button doesn't look right. Where can I get the drawing code for a treeview node from?


You can draw most parts of the standard Windows controls using the Windows visual styles API.

I haven't tried rendering a tree view control, but take a look at the .NET VisualStyleRenderer class, which appears to wrap all of the functionality of the unmanaged API.

0

精彩评论

暂无评论...
验证码 换一张
取 消