Consultor Eletrônico



Kbase P169952: NETUI: How to make the ENTER key behave like the TAB key on an ABL Form when pressed in a Microsoft
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/15/2010
Status: Unverified

GOAL:

NETUI: How to make the ENTER key behave like the TAB key on an ABL Form when pressed in a Microsoft Text-Box widget?

GOAL:

How to allow the operator to enter a RETURN (or ENTER on most keyboard) to complete the entry of a Microsoft Text-Box widget?

FACT(s) (Environment):

Windows
OpenEdge 10.2x

FIX:

In the Visual Designer:

1. Select all text boxes you wish to TAB through with the RETURN/ENTER key by holding down the CTRL key and clicking them with the mouse.

2. Go to Events and search the Keydown event.

3. Type General_KeyDown inside it.

4. Write the following event handler code:

METHOD PRIVATE VOID General_KeyDown( INPUT sender AS System.Object, INPUT e AS System.Windows.Forms.KeyEventArgs ):
IF e:KeyCode:ToString() = 'Return' THEN DO:
e:Handled = TRUE.
System.Windows.Forms.SendKeys:Send("~{Tab~}").
END.
END METHOD.
5. Now pressing the ENTER ( RETURN ) key in any of the above selected text boxes will perform the TAB key action and move FOCUS to the next widget.