Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numeric values in TextBox
Message
De
20/09/2001 10:28:05
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
20/09/2001 04:43:08
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00558222
Message ID:
00558718
Vues:
20
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform