Kbase 15445: Applying cursor movement, character vs gui mode
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Applying cursor movement, character vs gui mode
This knowledgebase entry describes a difference in behavior between
version 7 character mode and version 7 graphical mode having to do
with applying cursor movement, or controlling the position of the
cursor.
In a character application a customer may have tried to position the
cursor to the end of a line using code similar to the following:
DEF VAR xy AS CHAR FORMAT "X(15)" EXTENT 4.
xy[1] = "first line".
UPDATE TEXT(xy) WITH FRAME a.
EDITING:
APPLY KEYFUNCTION(1527) TO xy IN FRAME a.
READKEY.
APPLYKEY.
END.
(Keyfunction 1527 is the end key). In a graphical application this
will not work because Progress does not handle applied cursor
movement events in text groups correctly in this mode. This is a
known issue. The following is one way to work around the problem.
This code will function the same way in both graphical and character
mode.
Replace: APPLY KEYFUNCTION(1527) TO xy IN FRAME a.
with: IF LENGTH(FOCUS:SCREEN-VALUE) < 15 THEN
FOCUS:CURSOR-OFFSET = LENGTH(FOCUS:SCREEN-VALUE) + 1.
Progress Software Technical Support Note # 15445