Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying Percentages from Decimal Values
Message
 
To
19/04/2002 15:08:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00645265
Message ID:
00647032
Views:
17
Hilmar,

>>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 ...

>That will work, and that is exactly what I do when I need percentages. However, please note that the original question wanted the value to be displayed multiplied by 100, and to divide user input by 100 before saving - as in Excel. IOW, if you type "25%" in Excel, you don't save the number 25, but the result of 25/100.

Sure! That's what I meant here with "some code in ...". You haven't probably seen my last reply to David. The conversion steps are mentioned there.

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
Reply
Map
View

Click here to load this message in the networking platform