开发者

C#, treeview, multi-colo(u)red treenode text

开发者 https://www.devze.com 2022-12-22 19:10 出处:网络
How can I change a color of some part of treen开发者_运维问答ode Text ? For example, first symbol is red,

How can I change a color of some part of treen开发者_运维问答ode Text ?

For example,

first symbol is red, last symbols are yellow ..


Change the DrawMode property on the TreeNode to OwnerDrawText and handle the DrawNode event yourself.

Keep in mind though, that drawing the first glyph and the rest separately may cause unexpected results with complex scripts or diacritics.

0

精彩评论

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