Stop the function "inputdlg" by pressing enter

1 visualización (últimos 30 días)
Daniel Brun
Daniel Brun el 6 de Dic. de 2015
Respondida: Image Analyst el 6 de Dic. de 2015
Hello! I'm using the command "inputdlg" in a function to get the user to insert some coordinates, but I would like to stop that command by pressing "enter" and return to the main function of my program. Is it possible and how do I do it?
I'm thinking of that the user press "enter" and if MATLAB detect that the row is empty, then the "inputdlg" window will exit (and saves the coordinates the user has insert) and the program returns to the main function.

Respuestas (1)

Image Analyst
Image Analyst el 6 de Dic. de 2015
You need a patch file. I'm not sure why they don't fix this annoyance permanently. Find the patch file and official workaround here: http://www.mathworks.com/matlabcentral/answers/96640-how-can-i-modify-the-inputdlg-function-to-make-the-enter-key-synonymous-with-the-ok-button

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by