Multiple Progress Bars in Webapp

12 次查看(过去 30 天)
Adrian
Adrian 2023-9-20
评论: Adrian 2023-10-6
Hello.
Is there any practical solution out there, to place several uiprogressdlgs in a purposeful way? It obviously is possible, but since you can't define the position of the uiprogressdlg, if you place a second one, it will overlap the first one. We can counteract this, by defining the Message as a string array, where the first 4, 5 entries are empty strings. But there also seems to be a maximum size for the uiprogressdlg, such that positioning three for example is almost impossible and also dependant on the resolution of the used screen.
I know about multiWaitbar and progressbar, but those are not Webapp-compatible, since they open another figure.
But maybe I have overlooked something?

回答(1 个)

Pratyush Swain
Pratyush Swain 2023-10-6
Hi Adrian,
I understand you want to open multiple 'uiprogressdlg' in a purposeful manner. One immediate solution can be using new 'uifigure' objects for creating multiple 'uiprogressdlg', but you want to place several progress dialogues in a single figure to be web-compatible.
Alternatively, you can consider using a different approach to display progress information without relying solely on 'uiprogressdlg'. Here are a couple of workarounds:
  • Status Text: Instead of using multiple 'uiprogressdlg', dialogs, you can use a single 'uitextarea' or 'uilabel' component to display the progress information for different tasks. Update the text dynamically to show the progress of each task.
  • Panel/Grid Layout: Utilize a 'uipanel' or a grid layout like 'uigridlayout'to create a custom layout where you can position multiple progress indicators ('uilabel', 'uitextarea', or custom UI components) in a purposeful way. You can update the text or values of these indicators to show the progress of different tasks.
For more information, please refer to the following documentation links:
Hope this helps.
  1 个评论
Adrian
Adrian 2023-10-6
Thank you for your input.
These are all valid workarounds. Additionally one could simply change the Message in the progress bar to show the progress of the process(es).
But I think there are two drawbacks to these workarounds:
  1. They don't lock the app by making the window modal, as the uiprogressdlg does. One of the benefits of the uiprogressdlg is that it is almost impossible to overlook. A text field changing somewhere in the GUI might not have the same effect. Also, during the uiprogressdlg, there cannot be any other input to the app, which is very important if you have inpatient users and complex computations.
  2. While working with several tabs you either have to have several text fields in every tab, at the same position, showing the same thing - this sounds like a source of errors - or you have to flip tabs, such that always the right one with the textarea is ontop.
But you might be onto something though: If I take a panel and put it over the whole app window, I get the modal-effect that the uiprogressdlg has, plus it is easy to see. Then using the grid I could predefine several positions and then I only need a text based progress indicator. Depending on my time budget I will try that, but it sounds like much more work, then just opening and closing uiprogressdlg's.
Thank you for you ideas. I will leave the question open though, since maybe there is something we both overlooked. If I had time to implement a panel-and-text-based method, I will return and close the question.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by