Hi there,
I need some help with a format
I have a textfield with the result of a double, and the format is “00,000000” I would like to show only three digits "00,000) I have tried with format, validation mask, max. characters allowed, single…
If Locale.Current is a non-English country, as the screen shot would suggest, wouldn’t the decimal separator in the format argument have to be “,” and not “.”?
if your source is double you need to convert it to string for the textfield.
user can still input anything.
from the textfield you would convert the string back to double.
the type currency have a fix amount of decimal places.
Hi,
I convert the double totext, but I give a try tostring and It doesn’t operate. I will try with currency although, I’ll have to change a half of app.
Thanks
To add to Markus’ reply:
A format string “###.###.###” is wrong. Dot is the decimal separator, so the format string does not make real sense. Something like “###,###,###.000” would format a number to use 1000s separators and always three digits after the comma.
But as Albertos said: Please show the code you use to fill your text fields.
What you need to understand is that characters in a mask have special meaning and therefore differ from what is shown.
Eg the decimalSeparator is the comma in Germany and the dot in the US and might be something else in other countries, but in a formatting mask it is always the dot.