can't update the text in messagebox (GUI)
1 view (last 30 days)
Show older comments
Alessandro Russo
on 30 Mar 2016
Answered: Alessandro Russo
on 30 Mar 2016
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 Comments
Accepted Answer
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)
0 Comments
More Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!