Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric values in TextBox
Message
From
20/09/2001 10:28:05
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
20/09/2001 04:43:08
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00558222
Message ID:
00558718
Views:
21
>Dragan:
>
>
>>It should be the other way around,
>
>>SET POINT TO ','
>>SET SEPARATOR TO '.'
>
>I have this sentences at beginning of code.
>
>>Just make sure your keyboard driver has the comma between the zero and enter >on the numeric keypad.
>
>I don't know if exist keyboard like this, but maybe it's a solution.

There was, under DOS. The numeric keypad was having the decimal point converted to decimal comma for European keyboard drivers. Now under W2K (didn't try under NT4) it still uses the American decimal point.

This can be circumvented in the textbox.keypress:
... case chr(KeyCode)='.'
   nodefault
   dodefaut (asc(','), 0)
 case chr(KeyCode)=','
   nodefault
   dodefaut (asc('.'), 0)
...
So if the keyboard driver won't give you the comma, put it there yourself. BTW, I'm usually saving the inputmask property to a custom property in textbox.gotfocus, stripping the commas out of it, and restoring it on .lostfocus, because the number entry with the separators is in the least buggy, and confuses the users. The separators are OK for display.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform