TreeNodes and Fonts
.NET (Core and Framework)
1
Posts
1
Posters
0
Views
1
Watching
-
Hello, I am using the generic TreeView Control from .Net 2002. I want to have the root nodes of the control to have a bold font and I thought this could be easily done by setting the NodeFont attribute of the node. However, when I do this the font is indeed bold but it seems that the control does not resize the text box the node text is drawn in and the text gets clipped (I assume becase the new bold font is wider than the previously assigned text which isn't bold by default). Does anybody know what I can do to fix this. Sample of code below: TreeView treeView = new TreeView(); ... TreeNode tn = new TreeNode("Test"); tn.NodeFont = new Font(treeView.Font, FontStyle.Bold); ... Thank you in advance, Eric