Waitbar problems in GUI

6 visualizaciones (últimos 30 días)
abaza
abaza el 21 de Nov. de 2020
Respondida: TED MOSBY el 15 de Ag. de 2025 a las 12:36
Hello Matlab community!
I have a GUI in GUIDE and in one figure axes, some plottings are performed in a loop and finally I end up with a plot with pultiple lines (e.g. see fig1 attached)!
The point is that I have to use a waitbar till the whole process is finished, BUT, the waitbar doesn't allow me to use any other software in my PC since it always should pop up after each loop till all lines are all plotted!
So, do you know any solution for that???
I thought either:
1) you know something about WAITBAR properties that I am unaware of, that could allow me to work on other things on my PC while GUI software is running
or
2) Put waitbar integrated in a figure on the GUI! For that solution, I tried everything but still I cannot integrate it successfully!
Could someone give a solution????

Respuestas (1)

TED MOSBY
TED MOSBY el 15 de Ag. de 2025 a las 12:36
Hi Abaza,
You may try the following workarounds:
  1. Change the "Window style" to "normal" : https://in.mathworks.com/help/matlab/ref/waitbar.html?searchHighlight=waitbar&s_tid=srchtitle_support_results_1_waitbar#:~:text=Window%20style%2C%20specified%20as%20one%20of%20the%20following%3A
  2. Don’t use waitbar at all - draw a progress bar inside your existing GUIDE figure. It won’t create new windows, so it never makes your PC inaccessible : https://stackoverflow.com/questions/5368861/how-to-add-progress-bar-control-to-matlab-gui
  3. If you want to keep waitbar, avoid calling waitbar in every iteration (that brings the window to the front). Instead you can create it once and update its patch directly.
Hope it helps!

Categorías

Más información sobre Dialog Boxes en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by