Consultor Eletrônico



Kbase P98352: How to detect when the user input to an EDITOR, a FILL-IN, a COMBO-BOX or  a BROWSE Cell Widget reac
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/2/2004
Status: Unverified

GOAL:

How to detect when the user input to an EDITOR, a FILL-IN, a COMBO-BOX or a BROWSE Cell Widget reached a certain number of characters?

FIX:

Create a VALUE-CHANGED event trigger for the widget and use the widget's CURSOR-OFFSET attribute to know when the user input into the widget reached the specified number of characters:
DO:
DEFINE VARIABLE hWidget AS HANDLE NO-UNDO.
DEFINE VARIABLE iMaxChar AS INTEGER NO-UNDO.
ASSIGN
hWidget = SELF:HANDLE
iMaxChar = 80.
IF hWidget:CURSOR-OFFSET = iMaxChar + 1 THEN
MESSAGE "Reached the maximum number of specified characters".
END.