Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric values in TextBox
Message
From
19/09/2001 05:08:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
Numeric values in TextBox
Miscellaneous
Thread ID:
00558222
Message ID:
00558222
Views:
50
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
Next
Reply
Map
View

Click here to load this message in the networking platform