Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying Percentages from Decimal Values
Message
 
To
15/04/2002 21:50:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00645265
Message ID:
00645332
Views:
13
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform