开发者

Draw expand/collapse buttons (+/-) when Aero is off

开发者 https://www.devze.com 2023-02-19 00:07 出处:网络
With visual styles, i can use VisualStyleElement.TreeView.Glyph.Closed and VisualStyleRenderer to draw [+] button like in TreeView.

With visual styles, i can use

VisualStyleElement.TreeView.Glyph.Closed

and VisualStyleRenderer to draw [+] button like in TreeView.

But when user have a "Classic" style in Windows, visual styles are not supported and I still need to draw this glyph.

It is still possible to use classes like

System.Windows.Forms.CheckBoxRenderer

but I haven't found anything like this for Tre开发者_高级运维eView glyphs.


Yes, it is not possible to get that glyph. It is a simple one but you have to write the code. DrawRectangle and DrawLine. Or use a bitmap. Or make it look like the simple Vista triangles. Or don't enable ownerdraw when visual styles are off.

0

精彩评论

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