waitbar in GUI (by pushing a button to run a m-file)
2 次查看(过去 30 天)
显示 更早的评论
I have a m-file and now I want to make a GUI for it. In this m-file there is a For-loop that contains a waitbar that you can see below:
h=waitbar(0,'Please wait','Name','Inputs');
for o = 1:N %N is defined before
waitbar(o/N,h);
end
Now, how could this waitbar be shown inside the gui (not in another windows and not outside the gui) by pushing a button for running thid code?
0 个评论
采纳的回答
Walter Roberson
2012-8-7
waitbar() always creates a new figure to display the bar in.
You can examine the waitbar code and adapt it for your own needs (calling the result something else!)
3 个评论
Walter Roberson
2012-8-8
That code creates a new figure.
If you have a restriction that does not allow you to create a new figure for the waitbar(), then you should list what other restrictions you have. For example, is it okay if we clear the existing figure and put the waitbar in it?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dialog Boxes 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!