how to programmatically close modal figure?

Hello,
I have set WindowStyle as modal for waitbar since I wan't to disable the main figure untill the waitbar is Finished. But I am unable to close waitbar, matlab hangs. How can I programmatically close the modal figure?
Thank you.

 Respuesta aceptada

Shreeprasad Bhat
Shreeprasad Bhat el 22 de Abr. de 2017
Editada: Shreeprasad Bhat el 22 de Abr. de 2017

0 votos

I found the solution.
Just before closing figure, set the window style to normal.
h=waitbar(0,'Please wait...','WindowStyle','modal');
.
.
.
set(h,'WindowStyle','normal');
close(h);

Más respuestas (0)

Categorías

Más información sobre App Building en Centro de ayuda y File Exchange.

Preguntada:

el 18 de Abr. de 2017

Editada:

el 22 de Abr. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by