Sichel Mond
2009-04-10 12:49:48 UTC
Hi all
I need to display text in a RichTextBox or a TextBox EXACTLY as
windows renders it onto controls like buttons and labels.
Unfortunately, this is not the case by default. Some font settings
like Arial 8.25 point Regular look very similar in a TextBox and on a
Button,
while other settings like Arial 13 point Regular do not. The most
promising method to draw text exactly as the .NET Framework does it
internally is
by using TextRenderer.DrawText.
What I need is a TextBox-like control that uses TextRenderer.DrawText.
Does anyone know/have such a control? Or at least can help me
developing one? It would be very much appreciated.
thanks in advance!
I need to display text in a RichTextBox or a TextBox EXACTLY as
windows renders it onto controls like buttons and labels.
Unfortunately, this is not the case by default. Some font settings
like Arial 8.25 point Regular look very similar in a TextBox and on a
Button,
while other settings like Arial 13 point Regular do not. The most
promising method to draw text exactly as the .NET Framework does it
internally is
by using TextRenderer.DrawText.
What I need is a TextBox-like control that uses TextRenderer.DrawText.
Does anyone know/have such a control? Or at least can help me
developing one? It would be very much appreciated.
thanks in advance!