Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why to set decimals?
Message
De
14/02/2001 11:14:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00475552
Message ID:
00475772
Vues:
31
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform