Change values without press enter key

1 次查看(过去 30 天)
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"

回答(1 个)

Walter Roberson
Walter Roberson 2015-9-2
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.)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by