Kbase 14141: Keyed Lookup as User Types into Fill-In (Entry) Field
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Keyed Lookup as User Types into Fill-In (Entry) Field
This document gives example code that will allow you to
reposition the cursor in a browser (or other object) as the user
types into an entry field (FILL-IN).
NOTE: In this example, assume "MY-ENTRY" is an entry field
defined on a window somewhere.
/* Define these variables in your application */
DEFINE VARIABLE SPACE-COUNT AS INTEGER NO-UNDO.
DEFINE VARIABLE TEMP-STORAGE AS CHARACTER NO-UNDO.
/* Attach this code to an "ANY-PRINTABLE" or "ANY-KEY" trigger */
IF LASTKEY = 32 THEN /* SpaceBar Was Pressed */
DO:
SPACE-COUNT = SPACE-COUNT + 1.
TEMP-STORAGE = MY-ENTRY:SCREEN-VALUE +
FILL(" ",SPACE-COUNT).
END.
ELSE
DO:
TEMP-STORAGE = MY-ENTRY:SCREEN-VALUE +
FILL(" ",SPACE-COUNT) + LASTKEY.
SPACE-COUNT = 0.
END.
RUN KEYED LOOKUP PROCEDURE (OR CODE) HERE.
Progress Software Technical Support Note # 14141