Setting string in static text box requires a pause after setting otherwise doesn't update string

1 visualización (últimos 30 días)
I have found some odd behaviour in my GUIDE GUI recently that I can't find an answer to.
I have a static text box on my GUI that displays the program run status. When a button is pushed, a simulation starts that takes a few mins to run.
The first line of code in the callback for this button updates the static text to reflect that the simulation is running. Then the simulation code/calculations begin.
If I don't put a short pause (0.1 sec or so) after the "set" function line of code, the static text box string does not change. Why could this be?
  1 comentario
Adam
Adam el 8 de Nov. de 2018
It's fairly standard that the UI does not constantly keep refreshing itself. A
drawnow
instruction should be sufficient, though I doubt it is much, if at all, faster than a 0.1s pause!
See
doc drawnow
for details.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos


Versión

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by