OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Emiliano on June 02, 2015, 01:47:56 AM

Title: Preventing pressure Enter key
Post by: Emiliano on June 02, 2015, 01:47:56 AM
Hello,
I made a Modeless Dialog.
Unfortunately when the user presses Enter (eg. After filling in a textbox) the dialog box is closed.
I would avoid this and force the user to press the "X" or the button "Close" placed on the form.

I have noticed that this happens only when the focus is on a TextBox

How can I do this?
Title: Re: Preventing pressure Enter key
Post by: owenwengerd on June 02, 2015, 06:07:23 AM
You need to handle the OnCancelClose (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Event/CancelClose.htm) event. There is a FAQ about this (http://www.opendcl.com/forum/index.php?topic=1061.msg5527#msg5527).
Title: Re: Preventing pressure Enter key
Post by: Emiliano on June 03, 2015, 01:18:27 AM
Quote from: owenwengerd on June 02, 2015, 06:07:23 AM
You need to handle the OnCancelClose (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Event/CancelClose.htm) event. There is a FAQ about this (http://www.opendcl.com/forum/index.php?topic=1061.msg5527#msg5527).

thanks!!