Question problem with textbox and label with"Right To Left" property is TRUE

pooya1072

Well-known member
Joined
Jul 5, 2012
Messages
84
Programming Experience
Beginner
hi
I have a textbox and a Label on my form which only give number and dot (.)
for example if i want to input 12.3 when arrive to dot(.) , it move to start position.if i continue to input number so it fix.
the problem is in 3th line:
1
12
-------> .12
12.3
correct stat is :
1
12
-------> 12.
12.3​
 
RightToLeft property is used for international applications where the language is written from right to left, such as Hebrew or Arabic.
Are you sure that is what you want, or should you rather set TextAlign property?
 
Well, that is the RTL behaviour for the .Net TextBox control, comma and dot is interpreted as punctuation unless followed by a number that forms a decimal, in which case the TextBox corrects the placing of that char as you described.

For a numeric input only control you should rather be using the NumericUpDown control. Surprisingly you will see the same behaviour there also, but you can accommodate that by not using RTL and instead right-align that control.
 
Back
Top