Hello,
I use the Disigner App to create a GUI. From that GUI, I call subroutine functionen (m-files).
e.g.:
[table_a] = AddFUD(input_a, input_b, app, event)
In the function itself I want to update specific parts of the GUI by using:
app.textLabel.Text = append("Add set ", string(i), " of individual content");
drawnow
pause(0.01)
But this way, it works only in some functions. What´s wrong with my code? What would be the intented way of updating the GUI from an subroutine function?
Thanks for your help.

 채택된 답변

Mario Malic
Mario Malic 2021년 2월 8일
편집: Mario Malic 2021년 2월 8일

0 개 추천

Hi,
see step 2 of this question.
appHandle = findall(allfigs, 'Name', 'MyApp'); % handle to the figure of the app
app = get(appHandle, 'RunningAppInstance'); % the app
These three lines will make your code run through, you will not see anything but the last result.
app.textLabel.Text = append("Add set ", string(i), " of individual content");
drawnow
pause(0.01)
But this way, it works only in some functions. What´s wrong with my code? Everything looks fine.

댓글 수: 2

Matthias Lang
Matthias Lang 2021년 2월 8일
Thanks for the help. It works now.
Mario Malic
Mario Malic 2021년 2월 8일
You're welcome.
Please accept this as an answer, thanks in advance.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품

질문:

2021년 2월 8일

댓글:

2021년 2월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by