How to indicate if the program is processing in app designer?

조회 수: 40 (최근 30일)
sepand soltani
sepand soltani 2020년 1월 31일
My program sometimes takes 10-20 seconds to run. The problem is that I don't have any way to see if the program is processing or it just hit a bug.
Is there a way in app designer to let the user know that the program is running after the they've pushed the button?
function CalculateButtonPushed(app, event)
x=app.XEditField.Value;
y=app.YEditField.Value;
z=app.ZEditField.Value;
I=app.CurrentAEditField.Value;
[Bx,By,Bz] = Magnetic_field_solenoid_cartesian1(app,x,y,z,I);
app.BxmGsEditField.Value=Bx;
app.BymGsEditField.Value=By;
app.BzmGsEditField.Value=Bz;
end
  댓글 수: 1
Adam
Adam 2020년 1월 31일
Put some text on the GUI? I created a BusyCursor class that I use in regular figure and GUIDE apps. No idea if it works with AppDesigner as I haven't tried, but essentially all it does is change the cursor to the Windows busy cursor.
In other situations I use a progress bar (one from the File Exchange, but the builtin waitbar works too).
and in other cases I simply put a small place on my GUI for info text and change it to 'Processing...' and then to 'Done' or something similar once processing completes.

댓글을 달려면 로그인하십시오.

답변 (1개)

Mohammad Sami
Mohammad Sami 2020년 1월 31일
Use the function dlg = uiprogressdlg(app.UIFigure); See documentation for all available options with the function.
  댓글 수: 6
sepand soltani
sepand soltani 2020년 1월 31일
Worked flawlessly!! Thanks.
Muhammad Afiq Asyraf Bin Kamarulakmal
How to indicate if the process end

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by