can't update the text in messagebox (GUI)
2 次查看(过去 30 天)
显示 更早的评论
Hi all, i have a GUI, in which i have a piece of code that takes a bit of time to execute (30 mins) so during the execution i have put a messagebox whose text updates after certain instructions:
h=msgbox({'Process started!';'Phase 1/3: preliminar heart segmentation with region growing...'} ,'Progress','modal');
.
% piece of code....
.
.
set(findobj(h,'Tag','MessageBox'),'String',{'Process started!';'Phase 2/3: heart segmentation with snake...'}) %update the text in the previous msgbox
.
.
%other code
.
.
set(findobj(h,'Tag','MessageBox'),'String',{'Process started!'; 'Phase 3/3: map extraction with Frangi filter...'}) %another update of the msgbox
The problem is that i don't see the text updating when the GUI executes the code, i see only the first statement, and the last one after the istructions are all completed. How can i do? Thanks in advance.
0 个评论
采纳的回答
Vlad Miloserdov
2016-3-30
maybe it's easy to use "waitbar"?
H = waitbar(0,'Process started! Phase 1/3');
waitbar(0.3,H,'Phase 2/3')
waitbar(0.6,H,'Phase 3/3')
close(H)
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Analytics Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!