Thursday, April 16, 2009

TreeView Bug with Bold Fonts

In a .Net 2.0 Windows forms app, if you can’t get the a TreeNode to be displayed as bold within a TreeView, take a look at this KB article:

The text of a node may be truncated when you programmatically set the Font property of the node to the Bold value in a Windows Forms-based application that uses the .NET Framework 2.0;en-us;937215&x=8&y=13

You have to modify the "Text" property of the Node after it has been added to the TreeView.