Consultor Eletrônico



Kbase 14182: How to Implement Programmatic BACKSPACE for Editor Widget
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   07/08/1998
How to Implement Programmatic BACKSPACE for Editor Widget

If you have an EDITOR widget in which, for one reason or another, the
BACKSPACE key does not work. The following code will allow you to imp
lement a programmatic backspace functionality.

DEFINE VARIABLE RC AS LOGICAL NO-UNDO.
DEFINE VARIABLE EL AS INTEGER NO-UNDO.

EL = LENGTH(EDITOR-1:SCREEN-VALUE).
IF EL > 0 THEN
DO:
EL = EDITOR-1:CURSOR-OFFSET.
RC = EDITOR-1:SET-SELECTION(EL,(EL - 1)).
RC = EDITOR-1:REPLACE-SELECTION-TEXT("").
END.

10/09/97 Updated by KMH per customer request

08/07/98 Updated by BKM per customer request
I changed "(EL + 1)" to "(EL - 1)"

Progress Software Technical Support Note # 14182