If I set the UltraTextEditor TextHAlign = Right (at runtime, not at design time) then the text is aligned right properly. When I go to edit the text it is now left aligned. I do not see any properties that allow me to change the style of editing so I assume that the TextEdit box being used for editing should have the same properties as the UltraTextEditor.
I'm current using 8.2
Do you use RightToLeftLayout = true or RightToLeft = true in you form? this can confuse Infragistics controls.
The form is set to RightToLeftLayout = true and RightToLeft = RightToLeft.Yes
The control is set to RightToLeft = RightToLeft.Yes and TextHAlignment = Right
There is not an option of changing the form, but there is no reason to have the control set to RTL if that is causing an issue. I will see if that makes a difference.
I have solved my problem with by handling the enter and exit edit. I found that if I change the alignment to left and RightToLeft = yes then the edit operates as expected.
Here is the code if anyone else is interested.
public class UltTextEditorRTL : Infragistics.Win.UltraWinEditors.UltraTextEditor { public delegate void SetTextAlignmentHandler(Infragistics.Win.HAlign align); bool bIgnoreEditor = false; public UltTextEditorRTL() { this.BeforeExitEditMode += new Infragistics.Win.BeforeExitEditModeEventHandler(this.BeforeExitEdit); this.BeforeEnterEditMode += new System.ComponentModel.CancelEventHandler(this.BeforeEnterEdit); } private void SetTextAlignment(Infragistics.Win.HAlign align) { System.Diagnostics.Trace.WriteLine("SetTextAlignment"); Appearance.TextHAlign = align; } private void BeforeEnterEdit(object sender, CancelEventArgs e) { System.Diagnostics.Trace.WriteLine("BeforeEnterEdit-Start"); if (Appearance.TextHAlign != Infragistics.Win.HAlign.Left && RightToLeft == System.Windows.Forms.RightToLeft.Yes) { BeginInvoke(new SetTextAlignmentHandler(SetTextAlignment), Infragistics.Win.HAlign.Left); bIgnoreEditor = true; } else { bIgnoreEditor = false; } System.Diagnostics.Trace.WriteLine("BeforeEnterEdit-End"); } private void BeforeExitEdit(object sender, Infragistics.Win.BeforeExitEditModeEventArgs e) { System.Diagnostics.Trace.WriteLine("BeforeExitEdit-Start"); if (Appearance.TextHAlign != Infragistics.Win.HAlign.Right && RightToLeft == System.Windows.Forms.RightToLeft.Yes && !bIgnoreEditor) BeginInvoke(new SetTextAlignmentHandler(SetTextAlignment), Infragistics.Win.HAlign.Right); System.Diagnostics.Trace.WriteLine("BeforeExitEdit-End"); } }