I know there's a way to make the enter-key on the keyboard confirm the inputdlg() dialog, see here: http://www.mathworks.de/support/solutions/en/data/1-39UWQT/index.html?product=ML&solution=1-39UWQT
Okay it's a workaround, the problem is, I have to store it in the matlab directory (because as said on the page: "Since it is dependent on several private functions, newid.m will only work if stored in this location.").. The problem now is, I want to make a code which doesn#t rely on user changes in the Matlab directory because of missing privileges... Is there still another (perhaps dirty) way to achieve this behaviour?
Thanks!
Solution:
newid.m
from http://www.mathworks.de/support/solutions/en/data/1-39UWQT/index.html?product=ML&solution=1-39UWQT to a arbitrary folder, e.g. into your projects folderinputdlg()
is stored; you can find this out via which inputdlg
(e.g. C:\Program Files\MATLAB\R2011b\toolbox\matlab\uitools\inputdlg.m)private
-subdirectory and copy the two files getnicedialoglocation.m
and setdefaultbutton.m
and paste them into your project's folder where the newid.m
is located. Now call all your input dialogs by using newid()
instead of inputdlg()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With