Consultor Eletrônico



Kbase 19945: 4GL - How to Convert Fill-In Text to Upper Case (V9)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/15/2008
Status: Verified

GOAL:

How to Convert Fill-In Text to Upper Case

GOAL:

The following trigger code shows how to convert each character that is typed into a fill-in widget to upper case without losing the cursor position within the fill-in widget.

FACT(s) (Environment):

Progress 9.x

FIX:

Place the following code in the VALUE-CHANGED trigger of the fill-in widget:

IF KEYFUNCTION(LASTKEY) <> " ":U THEN
ASSIGN SELF:PRIVATE-DATA = STRING(SELF:CURSOR-OFFSET)
SELF:SCREEN-VALUE = CAPS(SELF:SCREEN-VALUE)
SELF:CURSOR-OFFSET = INT(SELF:PRIVATE-DATA).