Change values without press enter key

3 views (last 30 days)
Daniele Morello
Daniele Morello on 2 Sep 2015
Answered: Walter Roberson on 2 Sep 2015
hi everyone, my problem is: i have many edit texts in GUI, some of them are connected with a specific edit text called 'A'. everytime i change value of 'A' i would that all edit texts change dynamically, without press enter key after changed value in 'A'. how can i do? actually works only if i press enter "in A"

Answers (1)

Walter Roberson
Walter Roberson on 2 Sep 2015
You can use uicontrol KeyPressFcn callback to detect text entry, and you call use that callback to set() the String fields of other text boxes and you can drawnow() to have them update. But the one thing you cannot do, at least not without resorting to Java, is to use the KeyPressFcn callback to update the display of the edit box of the item it is a callback for: the current item will not be updated until enter is pressed. (I don't know, maybe you could use the Java Robot to press enter for you.)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!