How to write function for panel in App Designer?
5 次查看(过去 30 天)
显示 更早的评论
I want to write a code for when any of the button from particular panel in App Designer is being selected then it will print that 'panel 1 is selected'
0 个评论
回答(1 个)
Drishan Poovaya
2021-11-3
You can access the panel a button was present in using the Parent property.
Firstly, give each panel an appropriate title in the component browser. Let's assume you have a panel called 'Panel One'.
In the ButtonPushed callback for every button, add the following 3 lines
s = event.Source.Parent.Title; % s = 'Panel One'
k = strcat(s, ' is selected');
disp(k)
Now when you click on the button, 'Panel One is selected' will be rpinted out to the command window.
3 个评论
Drishan Poovaya
2021-11-12
You can refer to this link below, it has everything you need about app designer
Specifically to learn about events, refer below
另请参阅
类别
在 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!