Hey,
I have a GUI with a pushbutton. Depending on what the user previously selected, Matlab may take a few seconds to perform the task behind the pushbutton. I would like a simple indicator in the GUI that the pushbutton task is being performed and when it is done. I originally tried changing the pushbutton string to say "wait" during processing and then back to the original string afterwards. I did this with the following code:
name = get(handles.pushbutton, 'String');set(handles.pushbutton, 'String', 'Wait');do_whatever();set(handles.pushbutton, 'String', name);
However, when I tried this, Matlab never updated the pushbutton string (at least, that I could tell). Is there a way to force Matlab to update the string before handling the next command? Or is there a better way to do this?
Thanks, Tobyn
Best Answer