I am using richEditText in C# to display URDU data which is being written from Right to Left. and once changes are made to data control's horizontal scroll automatically moves to the extreme left as it does for English or any Left to write script. I want to move my HScroll to extreme Right everytime richedit's text is modifed/changed etc.
Asked
Active
Viewed 475 times
0
-
are you using windows forms or WPF? – Mujahid Daud Khan May 01 '13 at 16:03
-
The key is to add carriage return character "\r" at the end and then call focus(); – Mujahid Daud Khan May 05 '13 at 13:43
1 Answers
0
you have to set property of RichTextbox
for wpf application set
FlowDirection="RightToLeft"
for windows forms application set
LefttoRight="Yes"
after setting these properties use this syntax to update your text. worked fine for me.
richTextBox1.AppendText("میں نے ایک. نیٹ پروگرامر ہوں." + "\r");
richTextBox1.Focus();

Mujahid Daud Khan
- 1,983
- 1
- 14
- 23
-
LefttoRight property is set the text is being shown from right to left. Issue is with the HscrollBar instead of being set at right hand side of control its on the left hand side as it for english text – Hina May 01 '13 at 15:26
-
Since My text is alligned from right to left I want the HScroll to be Right alligned as well – Hina May 01 '13 at 17:03
-
I have tried ScrollToCaret() for richtextbox now the horizontal scroll moves to right but the vertical scroll also moves to bottom. I dont want it to move. – Hina May 01 '13 at 17:10
-
ScrollToCaret and Focus apparently seem to do the same job. But I guess thats the best I can get without doing some serious coding. Thanks – Hina May 04 '13 at 13:57
-
The key is to add carriage return character "\r" at the end and then call focus(); – Mujahid Daud Khan May 04 '13 at 18:04