How to tell how an uieditfield was exited?
Ältere Kommentare anzeigen
I have a uieditfield field for text input.
There seem to be at least three ways to indicate to the app that we are finished entering information into this field. The ValueChangedFcn is called when (1) the user presses Enter, (2) the user presses Tab, or (3) the user changes from the app to another program running on the computer.
Is there a way to figure out which of these three events occured? In particular, I'd like to catch (3) and ignore processing the current value of the field for the moment.
Akzeptierte Antwort
Weitere Antworten (1)
Bhargavi Maganuru
am 18 Feb. 2020
After typing in the edit field, if you click anywhere outside the edit field, editFieldValueChanged callback will be triggered.
Add the following line of code in the callback function.
disp("exited from editfield");
So whenever this message is displayed, user has clicked outside the app.
Hope this helps!
3 Kommentare
David Aronstein
am 18 Feb. 2020
Bhargavi Maganuru
am 19 Feb. 2020
HI David,
As of now there is no programmatic way to tell which of the events has triggered the callback.
David Aronstein
am 19 Feb. 2020
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!