Consultor Eletrônico



Kbase P187318: Is the APPLY ?CTRL-HOME? TO EDITOR statement expected to behave like when a user pressed these two k
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   06/05/2011
Status: Unverified

GOAL:

Is the APPLY ?CTRL-HOME? TO EDITOR statement expected to behave like when a user pressed these two keys?

GOAL:

Why does the APPLY ?CTRL-HOME? TO EDITOR statement fails to work the same way as when the user presses the CTRL-HOME keys?

GOAL:

How to programmatically achieve the same behavior as when the user presses the the CTRL-HOME keys on an EDITOR widget?

FACT(s) (Environment):

Windows
Progress 9.x
OpenEdge 10.x

FIX:


No, the APPLY ?CTRL-HOME? TO EDITOR statement is NOT expected to behave like when a user pressed these two keys. This is because only printable characters may be APPLY(ed) to an EDITOR widget. Consequently, most non-printable characters will not have any effect when used in conjunction with the APPLY statement to EDITOR widgets. This behavior is due to the way the Progress event model is implemented.

The simplest way to programmatically achieve the same behavior as pressing the CTRL-HOME keys on an EDITOR is to set its CURSOR-OFFSET attribute to 1. For example:
EDITOR-1:CURSOR-OFFSET = 1.

If you need to see the cursor at the begriming of the EDITOR text, then APPLY ?ENTRY? to the EDITOR widget after setting its CURSOR-OFFSET attribute to 1. For example:
EDITOR-1:CURSOR-OFFSET = 1.
APPLY 'ENTRY' TO editor-1.