C# Winforms bold treeview node doesn’t show whole text

I found this Post when searching through the web because I am facing the exact same problem.

However, appending a white space to the end of the node was not an option, and I found an alternative way that seems to fix the issue.

After setting my node font Bold, all I need to do is reset the node text with the same value.

Here is the Code Sample:

Font boldFont = new Font(treeview.Font, FontStyle.Bold);
node.NodeFont = boldFont;
node.Text = node.Text;

It seems that the node is redrawn after changing the text, which is exactly what I wanted in the first place.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)