Marcel Brekelmans wrote:
Hi,
When I set the text of a TreeView node to bold (or Italic for that
matter) programmatically, it doesn't show up with its length
adjusted. Instead, it has the length of the text in normal font, so
it is clipped at the end. Does anyone know of a workaround?
This is an issue in windows. I ran into this as well some time ago and
decided to go with an alternative color instead. The workaround, which
you probably won't like, is to set all texts to bold initially and then
programmatically set every node's text which has to be normal looking
to normal font.
If I'm not mistaken, Raymond Chen (The 'OldNewThing' blog) blogged
about the reason for this some time ago, but I can't find the exact
link. What I do know is that it's an issue in windows.
FB
--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website:
http://www.llblgen.com
My .NET blog:
http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------