Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET POINT and numeric input
Message
 
To
11/01/2002 07:42:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00603396
Message ID:
00603429
Views:
34
>Met hartelijke groeten,
>
>Hilmar.

(The other day I ended with "groeten" but I removed it again, not being sure ...)


>I can also imagine the cursor jumping around in the field, when you try to intercept the keyboard.

Don't think so, because we use these kinda things here and there. However, I think it depends on what you do, and f.e. switching Insert-state On and Off does (cursor goes to the beginning of the control). So yes, be careful to test the trivial stuff first, because anomalies may grow into pain.

>Does that mean that you use SET POINT TO "." for forms, and SET POINT TO whatever_the_user_prefers for reports?

No, in the end we never change anything, but the showing of things go over a custom (system / framework) function. It converts thousand-separator and decimal separator accordingly, and the country (app-parameter) defines how.
Btw, by not using generic stuff like reports all this is avoided, but all has to be done yourself. So what is better ? our luck is that we created all (report generation etc etc) right from the beginning (FoxBase) because it just wasn't there back then. Up to the printerdrivers.(f.e.).
Thus, the forms just accept the general VFP settings, though when writing the before reply I found an IF _WINDOWS - SET DECIMAL POINT TO "."
I didn't even know it was (actively) in there (anymore), and whether it does something ... I'm not sure. The comment says that "for Windows the default is a comma, and for Dos it is the dot". This code is obviously from FPW2.6 trials, which' version never got released (fake windows).

Any form showing stuff (or prints) have a cShowNumericfFieldContents = SYDT(nNumericField) or SAY SYDT(nNumericField).

nNumericField = 100000.25
and the output of the function is 100,000.25 or 100.000,25 accordingly.

It's an 150 line function (including some Dutch comment), and if you like I wil email it to you. The function will work as some calculated field part for the ControlSource to Grid's cells too (tried that once), but the advise is not to use it like that (too slow).

M.vr.gr.,
Peter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform