waitbar not on top
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a code that has many computation steps, each with a waitbar that open and close. My problem is that it is not possible to work on other apps, like outlook or word, since the waitbar when created always appears on top and get the focus.
Is there a way to create the waitbar but do not change the window focus?
Best Regards,
Denis
0 个评论
回答(1 个)
Joseph Cheng
2015-7-8
In your implementation do you need to close and create a new waitbar? can you re-purpose the existing waitbar to encompass the other computation steps?
h = waitbar(0,'Please wait...');
steps = 1000;
for step = 1:steps
% computations take place here
waitbar(step/steps,h,['computing 1: ' num2str(step)])
end
for step = 1:steps
% computations take place here
waitbar(step/steps,h,['computing 2: ' num2str(step)])
end
for step = 1:steps
% computations take place here
waitbar(step/steps,h,['computing 3: ' num2str(step)])
end
close(h)
另请参阅
类别
在 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!