can't update the text in messagebox (GUI)

4 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

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

Più risposte (1)

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

Categorie

Scopri di più su App Building in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by