Why does the spacing of text of an UltraTextEditor change when it is in Edit mode compared to when it isn't? It seems that when the control has focus, an extra pixel of space is created around all the text, moving it slightly to the right, and slightly down. This is more noticeable if there are multiple lines of text.
This is due to the differences in character kerning between GDI and GDI+. The .NET TextBox, which we use in the UltraTextEditor to do the editing, is a wrapper around the old COM TextBox control, which predates GDI+. The native drawing mechanism for .NET is GDI+, which the UltraTextEditor uses when not in edit mode. GDI+, in an effort to maintain "device independence", significantly changed the kerning algorithm, thus producing the difference in spacing with the same font under the different drawing platforms.
You can avoid this behavior by setting the control's TextRenderingMode to 'GDI', or by setting its 'AlwaysInEditMode' property to true.
Hello Brian
if I set the property 'AlwaysInEditMode' , then a ToolTip on the UltraTextEditor will not be displayed.
Is there a workaround for this issue?
Thanks!
Thanks. :)