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.

采纳的回答

Vlad Miloserdov
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)

更多回答(1 个)

Alessandro Russo
Alessandro Russo 2016-3-30
Ok that works really better! Thank you, problem solved!

类别

Help CenterFile Exchange 中查找有关 Text Analytics Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by