Kbase P38526: How to force capitalization of user input in a smart data vi
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  27/08/2003 |
|
Status: Unverified
GOAL:
How to force capitalization of user input in a smart data viewer for character fill-in and editor fields of CHARACTER data type only.
GOAL:
How to prevent the above capitalization code achieving the above objective from firing if the current widget has a DATE, a DECIMAL or an INTEGER data type or is a RADIO-SET or TOGGLE-BOX widget?
FACT(s) (Environment):
Windows
FACT(s) (Environment):
Progress 9.x
FIX:
Define a local override for the SmartDataViewer's "'VALUE-CHANGED'" procedure to include the following code before "RUN SUPER" statement:
DEFINE VARIABLE iCursorPosition AS INTEGER NO-UNDO.
IF CAN-DO("FILL-IN,EDITOR":U, SELF:TYPE) AND
NOT CAN-DO("DATE, DECIMAL, INTEGER", SELF:DATA-TYPE) AND
NOT CAN-DO("RADIO-SET, TOGGLE-BOX", SELF:TYPE)
CHR(LASTKEY) <> CHR(32) THEN DO:
iCursorPosition = SELF:CURSOR-OFFSET.
ASSIGN
SELF:SCREEN-VALUE = CAPS(SELF:SCREEN-VALUE)
SELF:CURSOR-OFFSET = iCursorPosition.
END.