How to write function for panel in App Designer?
17 views (last 30 days)
Alamanda Ponappa Poovaya on 3 Nov 2021
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');
Now when you click on the button, 'Panel One is selected' will be rpinted out to the command window.