I'm new to Windows Forms and try to do something. I'm using C#.
I'm using Windows Forms and I've put eight textboxes on my form, and all are numeric with decimal value.
I like to achieve the results below. My decimal separator is a comma and thousand separator is a dot.
I've ever seen something like ##.###,## or whatever, but don't remember.... How can i achieve the below approach?
So the idea is when I type 1234 and leave the focus from the textbox it should format and when I get in the textbox back again the thousand separator should not format only the decimal separator.
I think I've to use some events like LostFocus.
Input ????????????????Result
1234????????????????1.234,00
12.34????????????????????12,34
12,34????????????????????12,34
1234567?????1.234.567,00
12,34????????????????????12,34
12345,67?????12.345,67
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…