Finding the previous CTL ID on Default Push Button event

Started by Jeff Wilder, October 27, 2021, 06:02:45 PM

Previous topic - Next topic

Jeff Wilder

Hello,
I have a Nomads form with several multi_line controls and a button with the Default Push Button property set. When the user presses enter, my button click logic is executed.

My question: Is it possible to know inside that button click logic which multi_line had focus when the user pressed the enter key? All of the Nomads ID related variables appear to point to the button CTL, but I am looking for the multi_line CTL.

Thank you,
Jeff

Loren Doornek

Try DEC(MID(MSE,25,2)).  That should return ID of the last control to lose focus.

Mike King

Generally, for buttons, you can set the signal only option to have the system process the event but not change focus.  This means the current focus is the control you were on when the button was pressed.

The only drawback is any on change or loss of focus logic for the control you were on when pressing the button will not fire as you technically aren't leaving that control.
Mike King
President - BBSysco Consulting - http://www.bbsysco.com
eMail: mike.king@bbsysco.com