Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Floating decimal
Message
From
10/02/2004 19:24:54
 
 
To
10/02/2004 19:11:03
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00876090
Message ID:
00876094
Views:
10
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform