is it possible to add an icon to a waitbar?
5 views (last 30 days)
Show older comments
I want to add an icon to a wait bar, like in an error message in errordlg, is this possible?
Thank you for any help you offer,
Ben
0 Comments
Answers (2)
Walter Roberson
on 27 Aug 2019
waitbar() returns the handle to a figure. The figure contains an axes and a java area. The axes is used to place the current message. The java area will be controlled by java methods -- the update of the bar length is done by calling java routines.
errordlg() and similar invoke msgbox() to create the box and icon. msgbox() creates a figure, and puts an axes inside the figure. Inside the axes it uses image() to draw the icon.
Therefore, in order to put an icon into a waitbar, find the axes inside the handle, and image() into the axes.
You will, however, have to be careful about the positioning of the image: you probably do not have very much room unless you make the figure larger (so that it can hold a larger axes.)
There is no built-in method to add an icon to a waitbar.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!