can't update the text in messagebox (GUI)

1 view (last 30 days)
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.

Accepted Answer

Vlad Miloserdov
Vlad Miloserdov on 30 Mar 2016
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)

More Answers (1)

Alessandro Russo
Alessandro Russo on 30 Mar 2016
Ok that works really better! Thank you, problem solved!

Categories

Find more on Just for fun in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!