|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
How to: Display Right-to-Left Text in Windows Forms for Globalization
Certain scripts, such as Arabic, are written from right to left. To control the flow of text in a control such as a, you use the property. An additional step is needed, however, to mirror the control itself on the form: You must set the property, which controls the appearance of controls within a container.
You do not need to change the values of properties such as thevalue of a TextBox control: the value stays the same but the alignment is reversed.
To display right-to-left text
Set the form's RightToLeft property to.
Set the form's RightToLeftLayout property to true.
Place a TextBox control on the form, either programmatically or using a development environment such as Visual Studio. It will inherit the right-to-left setting of the form, since the default value for the RightToLeft property is. (If you wish to override the setting for another control on the form, set that control's RightToLeft property to .)
Compile and run your application. You will notice that the form's controls and title are mirrored to run from right to left. Enter text inside of the TextBox. You will notice that it enters from right to left.