Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying currency fields to 2dp.
Message
De
07/04/2006 17:12:36
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
À
07/04/2006 10:00:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01111372
Message ID:
01111599
Vues:
16
Hi Hilmar, thanks for the reply.

>How about defining the TextBox.InputMask property through code, probably in the TextBox.Init() event? The number of digits for the integer part can be read from a property, or calculate on the basis of the width.
>

Your idea would be great for numeric fields with a definite width, but currency fields have a fixed-length of 8. I could build an inputmask with 2dp, but there is no way of knowing how many digits to provide before the decimal point. Also, many fields are integer, which VFP converts to N(4). If I used field-length to build the inputmask, I would only get 9999, when many fields would be expecting more digits.

Hence I think I am back to my original solution of having a 'majority' template mask of '9999.99', and overriding with a larger mask where the expected value is 10,000 or more.


Regards,
Alan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform