GUI Edit Text value update
Show older comments
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
Answers (2)
Walter Roberson
on 16 Sep 2013
0 votes
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
on 16 Sep 2013
0 votes
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.
Categories
Find more on Annotations 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!