Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why to set decimals?
Message
From
14/02/2001 11:14:40
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00475552
Message ID:
00475772
Views:
36
Terry,
I would probably go for the work around. It's a one liner and respects the setting of inputmask. In any case I would use the assign method to handle the issue (encapsulation). Otherwise you have to "remember" to use a work around whenever you assign a value to the textbox.

On the same subject, if the field is bound to a table, VFP seems to respect the precision of the field.

>>
>>*-- Method value_assign
>>LPARAMETERS vNewVal
>>IF VARTYPE(m.vNewVal) = "N"
>>	*-- force VFP to correctly display the number of decimals specified in the inputmask
>>	THIS.VALUE = m.vNewVal * 1.0000000000000000000
>>ELSE
>>	THIS.VALUE = m.vNewVal
>>ENDIF
>>
>Daniel,
>Thanks for the work around. Its nice to know that it's not some secret bug or gros mis-understanding on my part regarding inputmask and format properties. Now what to do - should I just SET DECIMALS to a higher precision or apply the masking technique in your work-around?
>Thanks
>Terry
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform