Set the Font of Tree Control
-
Please let me how to change the font of parent node and also how to make it BOLD in tree control. Thanks in Advance
There is no TVM_SETITEMFONT message, and TVITEM has no font member - so you're going to have to roll your sleeves and do it yourself. Or, there are plenty of articles on codeproject to do with owner draw tree controls. It's a shame, though - I'd think font is quite a good extension to a tree view item properties. But it's not up to me! Good luck, Iain.
-
Please let me how to change the font of parent node and also how to make it BOLD in tree control. Thanks in Advance
You can change the font with custom draw. Handle
NM_CUSTOMDRAW
and select a new font into the DC that you get with the message. Bolding an item is built-in, set theTVIS_BOLD
style on the node (or you can just select a bold font when you handleNM_CUSTOMDRAW
).--Mike-- Visual C++ MVP :cool: LINKS~! CP SearchBar v3.0 | C++ Forum FAQ "That's what's great about doing user interface work. No matter what you do, people will say that what you did was idiotic." -- Raymond Chen