How do I put a waitbar in an existing figure in MATLAB 7.8 (R2009a)?
20 views (last 30 days)
Show older comments
I would like to put a waitbar in an existing figure, such as a GUI figure, instead of having it appear in a separate window.
1 Comment
Aurelien Queffurust
on 26 May 2011
I would really appreciate to see this question/answer as a Technical Note on the technical support web site.
Thanks,
Aurélien
Accepted Answer
Doug Hull
on 13 Jan 2011
2 Comments
Aurelien Queffurust
on 26 May 2011
Hi Dough,
This code works fine in R2010b but fails in R2011a :
It returns the error message :
??? Error using ==> waitbar>extractHandles at 280
Couldn't find waitbar handles.
Error in ==> waitbar at 89
handles = extractHandles(whichbar);
Error in ==> Untitled at 25
waitbar(step / steps,f)
The waitbar code has changed in 11a .
Walter Roberson
on 26 May 2011
I do not have 2011a to look at the code with, but I would _speculate_ that it might be necessary to set the figure Tag to 'TMWWaitbar'
More Answers (1)
Jelle
on 9 Feb 2011
Hello,
I have a problem with this function when i want to update the message corresponding to the waitbar. When the waitbar has an own figure this command works fine:
waitbar(x,figurehandle,'updated message')
But when figurehandle corresponds to the figure where the waitbar is placed in, then the update message function does not work anymore. This error is shown:
??? Error using ==> waitbar at 106
Improper arguments for waitbar.
Caused by:
Error using ==> set
Conversion to double from cell is not possible.
How can I solve this problem?
Kind regards,
Jelle
1 Comment
Walter Roberson
on 9 Feb 2011
I just looked at the waitbar code as of 2008b, and it is definitely not designed for the possibility that the figure might have a line, patch, or axes other than those that belong to the waitbar. In narrow situations, though, the crash wouldn't happen until it went to update the message.
See Also
Categories
Find more on Dialog Boxes in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!