Update Matlab App Designer App
5 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Mario Malic
2021-2-8
编辑:Mario Malic
2021-2-8
Hi,
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!