Updated Value Edit Text

조회 수: 6 (최근 30일)
Daniele Morello
Daniele Morello 2015년 9월 7일
댓글: Walter Roberson 2015년 9월 7일
hi everyone, my problem is: i have to compare two values of the same edit text, the one is the "old" value, and the other one is the value that i insert. i "save" the old value into a variable with funcion OLD_VALUE = get(handles.editText, 'String'). During the execution of the program, i digit some numbers into the edit text, then i should to do the comparison, but at this point, if i use the same function get(handles.editText, 'String'), this function give me the same old value. how can i do to get the updated value?

답변 (1개)

Walter Roberson
Walter Roberson 2015년 9월 7일
If you are using a callback of the edit control then You will not be able to get the new value until you press enter on the edit control
  댓글 수: 2
Daniele Morello
Daniele Morello 2015년 9월 7일
the comparison between two values happens when i click on a specified button, that's why i need to get the new value (the one that i insert) immediatly.
Walter Roberson
Walter Roberson 2015년 9월 7일
If you are using a callback of the edit control, then it cannot be done without going to the Java level. If you are using a callback of something else, the update of the property will happen immediately, and will be reflected in the display visually as soon as there is a drawnow(), pause(), figure(), uiwait(), waitfor(), or control is returned to the command line.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by