Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Irregular Character Spacing in TextEditor and UltraTextEditor
posted

I have noticed some irregularities with character spacing when using the Windows Forms TextEditor and the Infragistics UltraTextEditor.

(see attached screenshot)

  • The first control is an UltraFormattedTextEditor; notice that the spacing for the same characters changes from the beginning of the text to the end of the text.
  • The second control is an UltraFormattedTextEdtior and the Third is a TextEditor.  Notice that the whitespace in between the words "This is a TextEditor" and "This is an UltraFormattedTextEditor" is of a different size between the two controls.

Does anyone know if this is being looked at as a bug, or if there is any way of stopping it?

Many Thanks,

Kate

  • 469350
    Verified Answer
    Offline posted

    This is most likely a result of GDI vs. GDIPlus. You will notice the same discrepency between a TextBox (which uses GDI) and a Label (which uses GDI+) in DotNet.

    The UltraTextEditor has a TextRenderingMode property you can use. There is also a static property that will affect all InfragisticsWinForms controls:

    Infragistics.Win.DrawUtility.UseGDIPlusTextRendering 

    There is also a method in DotNet on the Application object:

    Application.SetCompatibleTextRenderingDefault(false);