Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trim trailing zeroes from number in form field
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01508560
Message ID:
01508561
Vues:
63
>I have to be missing something simple here, I hope.
>
>I have a form field that is using a numeric field type. It may be 60, 60.5, or 60.05, with anything from an integer to two decimal places. If the number is 60.00, it needs to show simply 60, etc. In other words, remove trailing zeroes. Setting decimal places and formats seem to only account for a fixed number of decimal places - I would like that to display based upon whether the extra decimal places are needed. I've checked inputmask and format properties but don't see something that will do this easily.
>
>Is there a way to only show what's needed but allow input for decimal places?
>
>Thanks

I don't think it's a simple problem. You can use a transparent label and show label with something like padr(this.value, 10) when you LostFocus out of the field.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform