0

I have a textBox and I want when I write into that textBox (mix language [Persian, English]) the words to be typed into that textbox in the same way as I typed.
This is the example:

This is the text I typed

We/میلاد@12

but the order was like that:

    1. we
    1. @
    1. میلاد
    1. /
    1. 123

how can I fix this problem

LopDev
  • 823
  • 10
  • 26
milad
  • 43
  • 5
  • If that is in a browser then css seems to do the trick: https://stackoverflow.com/a/61770541/578411 – rene Oct 03 '20 at 08:24
  • @rene no I'm in winform – milad Oct 03 '20 at 08:49
  • @rene how can i convert that into winform? – milad Oct 03 '20 at 08:49
  • Did you set the [RightToLeft](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.righttoleft?view=netcore-3.1) property? – rene Oct 03 '20 at 08:52
  • Maybe helpful: https://stackoverflow.com/questions/34739602/textbox-rtl-with-letters-and-numbers/34747782#34747782 – rene Oct 03 '20 at 09:01
  • @rene yes i set that but because of the Persian language char, it's not working, but in html and css the link you send to me it's working, i need that into winform – milad Oct 03 '20 at 09:10

1 Answers1

0

If you check

  • the RightToLeft and
  • the TextAlign Properties

your issue will be solved.

These are the Microsoft Documentations:

And below you can see these Properties how they appeared in the Properties Section in Visual Studio: enter image description here enter image description here

The values of the Properties in the pictures are indicative , change them accordingly as you want and your problem will be solved.

LopDev
  • 823
  • 10
  • 26