Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency symbols in input mask
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00510226
Message ID:
00510238
Views:
22
Hi!

VFP numebrs are entered from left to right. User types 1 - it shows "$ 1 .00". Than user types 2, it shows "$ 12 .00". As soon as user types a dot, it jups to the fracional part of the number. It was always obvious and usable for users. Why you want to change the way it is used?

If you still need that, you can simulate this programmatically. You will require to work over the character value (TextBox have no control source and value is edited in the Value property of the TextBox, than you manually read it from the source field in Refresh method of textbox, and manually write it to the source field in the valid event of the text box). After you organize above, do following:
- specify input mask to enter only digits and preceed value by the currency symbol
- convert any zero/empy values to the string like '00000000'
- do not include input mask into the value
- in the KeyPress event write the code that will alter the value property properly after each user key pressing, use NODEFAUL to disable default behavior of key pressing. Call InteractiveChange here because it will not be called automatically.

Well, looks not quite easy and quick, so think if you really need to change the default input behavior of VFP text box for numbers.


>Hi,
>
>I wanted in a textbox the following text:
>ƒ 99999.99
>
>The 99999.99 can be any one digit. I would like to align this right (no a problem) but when I enter in the textbox a '1', it must display ƒ 00000.01.
>When I enter another digit, e.g. '2', it must say ƒ 00000.12. I tried to set de input mask to '$$99999.99'; this doesn't work.
>All I see in the textbox is $$999999.99 (expect those 9's). Tried to use SET CURRECNY TO 'ƒ'; doesn't work.
>Setting the Format property to '$R' also doesn't work.
>Has anyone any ideas how to do this?
>
>Thanks,
>Erik Dokter
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform