Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying Percentages from Decimal Values
Message
 
À
15/04/2002 21:50:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00645265
Message ID:
00645332
Vues:
14
Hi David,

>Is there a way to have a textbox bound to a decimal value in a view to display the value as a percentage? For example, if the textbox is bound to a field whose value is .25, is there a way to get it to display as 25%, and to have the user be able to enter 25 and store the value .25 back to the view?
>I played around with changing the values in When/Valid. Is there another way?

Guess, what I did yesterday <g>. Not with percantage, but as a generic solution. The % could be put in with the InputMask.

I've put some code in the Init, GotFocus, LostFocus and Refresh to get this done. It's not already tested completely, but IMO it should run. If you're interested, I will be glad to post the code here, so you can test it as well and give some comments, so we both could get a good solution ...

Regards,
Armin

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform