Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numeric values in TextBox
Message
De
19/09/2001 05:08:25
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Numeric values in TextBox
Divers
Thread ID:
00558222
Message ID:
00558222
Vues:
49
Hi All:

I think that anyone more found this problem yet. I have an application in Fox 2.5. We're adapting this application to the Euro currency. This mean that application must have decimal in the numeric field that contain amount.

In Spain, the mark that we use in the SET POINT is the ',', and the mark that we use in the SET SEPARATOR is the '.', therefore the application have the next sentences in the begin:
SET POINT TO ','
SET SEPARATOR TO '.'

The problem occurs when the users insert a value in the fields with decimals. They must press the key ',' to insert a decimal value. THis is important in the users use the numeric part of the keyboard that only have the key '.'

We try to get it assign the key '.' to the key ',' with the sentences: ON KEY LABEL chr(46) KEYBOARD chr(44). With this when I press the key '.' fox run the key ','. But this have a problem, in a textbox if yoi insert by example 89.09 you press keys '8','9','.','0','9'. When you press the key '.' fox change the integer part of the field whit 0 and you get 0.09.

I try the next too:
ON KEY LABEL chr(46) DO myprg.prg

*Myprg.prg
*
*Chr(46) is '.'
*Chr(44) is ','

CLEAR TYPEAHEAD &&CLean buffer
KEYBOARD chr(44) &&insert in the buffer the ','

The result is the same

Why is this? Anyone knows other solution?

Thanks in advance
Fernando Molina
fmolina@sintonia.es
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform