Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Floating decimal
Message
De
10/02/2004 19:24:54
 
 
À
10/02/2004 19:11:03
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00876090
Message ID:
00876094
Vues:
12
>Hi All
>
>Anyone have a class that will allow the user to enter numbers and force the decimal to 2 places. For example, the user will enter 123 and the text box will display 1.23 or user enters 2 and display 0.02.
>
>Thanks.

James,

You may define the textbox (say txtQuantity) with '999' as inputmask-property. This forces to accept only 3 digits. Then you chose the event when you wnat to convert the input to a two-decimals quantity. In that event you simply re-assign txtQuantity.value = txtQuantity.value/100

Regards,

Enrique
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform