GUI Edit Text value update

Hi,
A very simple GUI: Three Edit Text, 'a', 'b' and 'c'. One button in toolbar. The aim is to use toolbar button to do 'add function', i.e. c=a+b.
My problem is: Once I change the numeric value in edit text 'a' or 'b', I have to click somewhere else on the GUI to make this change effective. Otherwise the new value in edit text will not be passed to 'add function' which corresponds to the Clickedcallback function of the toolbar button.
Can anyone help?
Thanks
Yu

답변 (2개)

Walter Roberson
Walter Roberson 2013년 9월 16일

0 개 추천

You are correct. edit boxes (and uitable boxes) are not updated until focus is lost or they are clicked on or return is pressed. Focus would be lost when the toolbar button is clicked on, so updating will happen in that case.
Sean de Wolski
Sean de Wolski 2013년 9월 16일

0 개 추천

Hi Yu,
There is a bug in uipushtool that it does not first fire the callback of the edit box. There is a workaround that relies on undocumented functionality. If you contact technical support and reference 1-D3S3VO, they'll be able to help you.

카테고리

도움말 센터File Exchange에서 Annotations에 대해 자세히 알아보기

질문:

2013년 9월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by