MATLAB: How to embed a waitbar in a specified figure

waitbar

How to embed a waitbar in a specified figure?

Best Answer

You can pass a handle to waitbar() as the first parameter. It must be of an graphics object for which getappdata(TheHandle, 'TMWWaitbar_handles') returns a structure with five fields of the proper internal names. The internal work of doing the update is hidden in a p-coded file, so I cannot tell at the moment if you could create a false environment (such as a uipanel) or not.
If you have not created the false environment, then there is no option or code path in waitbar() that would allow you to use an existing non-waitbar instead of it creating a new figure.
Related Question