I have a Get with an Action. I would like to execute the action when the user press Enter too.
Is it possible?.
Thanks
Code: Select all | Expand
@ 2, 295 GET cGet of oDlg SIZE 140, 10 ;
ACTION msgalert("hello") PIXEL UPDATE
Code: Select all | Expand
@ 2, 295 GET cGet of oDlg SIZE 140, 10 ;
ACTION msgalert("hello") PIXEL UPDATE
Code: Select all | Expand
oGet:bKeyDown = { | nKey | If( nKey = VK_RETURN, msgalert("hello"), ) }
Code: Select all | Expand
#include "fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oGet1 , cGet1 := SPACE(10)
LOCAL oGet2 , cGet2 := SPACE(10)
DEFINE DIALOG oDlg
@ 2 , 1 GET oGet2 VAR cGet2
oGet2:bKeyDown = { | nKey | If( nKey == VK_RETURN, MSGALERT(CGET2) ,) }
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
Code: Select all | Expand
oGet2:bKeyDown = { | nKey | If( nKey == VK_RETURN, ( oGet2:Assign(), MSGALERT(CGET2) ), ) }