Borrar filtros
Borrar filtros

How to implement modal progress bars and wait bar in MATLAB Simulink

10 visualizaciones (últimos 30 días)
Kunal
Kunal el 9 de Mayo de 2024
Comentada: Kunal el 16 de Mayo de 2024
Hello everyone,
I've developed a Simulink model where progress bars are displayed on a UI figure within the Simulink environment. While a progress bar is active, users can inadvertently click anywhere within the Simulink interface. However, I want to restrict user interaction with the Simulink interface while a progress bar is active, allowing control only when the progress is completed. How can I implement this restriction effectively?

Respuestas (1)

Poorna
Poorna el 15 de Mayo de 2024
Hi Kunal,
I see you want to implement a modal progress bar. In MATLAB you can create modal ui figures by setting the "WindowStyle" property of the ui figures to "modal". By setting the "WindowStyle" property to "modal" the ui figure will be displayed on top of all other figures and restricts the user from accessing other parts of the application.
To know more about the "WindowStyle" property refer to the "Window Appearance" section in the following documentation:
If you are using "waitbar" function to mimick a progress bar, then you can use the "WindowStyle" of the wait bar to make the bar modal.
Hope this Helps!
  1 comentario
Kunal
Kunal el 16 de Mayo de 2024
Hello ,
Thank you for your response. Even though I've set the "Windowstyle" property to "modal" for the UI figure, users can still access the Simulink page. However, when I apply the same property to a waitbar, it freezes the MATLAB window but not the Simulink window while the progress bar is active.

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by