Consultor Eletrônico



Kbase 21468: Making the Period Behave As a COMMA on Numeric Key Pad
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   08/07/2009
Status: Verified

GOAL:

Making the Period Behave As a COMMA on Numeric Key Pad

GOAL:

Changing DOT in numeric pad making it behave as a COMMA for European Countries.

GOAL:

How to change the dot in numeric pad to make it behave as a comma?

FACT(s) (Environment):

Progress 9.x
Progress 8.x
OpenEdge 10.x
All Supported Operating Systems
OpenEdge Category: Language (4GL/ABL)

FIX:

In some European countries the decimal separator is a COMMA rather than a dot (period). With high volume input the missing COMMA key can noticeably slow down data entry. This Solution provides European users a small trigger code that can simplify the input of decimal values, with regard to the Local numeric format.
This small procedure illustrates how you can still use the dot in the numeric key pad and make it become a COMMA at run time.

DEFINE VARIABLE MD AS DECIMAL NO-UNDO.
DEFINE VARIABLE MD2 AS DECIMAL NO-UNDO.

DEFINE FRAME a MD MD2 WITH FRAME a THREE-D SIDE-LABELS.

ON "." ANYWHERE
DO:
IF SESSION:NUMERIC-FORMAT = "American" THEN
RETURN.
ELSE
IF SESSION:NUMERIC-FORMAT = "European" THEN
DO:
IF FOCUS:DATA-TYPE = "decimal" THEN
DO:
APPLY KEYCODE(",").
RETURN NO-APPLY.
END.
END.
END.

ENABLE ALL WITH FRAME a.

WAIT-FOR CLOSE OF THIS-PROCEDURE.


FIX:

References to Written Documentation:

Progress Startup Command and Parameter Reference, -numsep and -numdec startup parameters