Filter löschen
Filter löschen

How to write function for panel in App Designer?

11 Ansichten (letzte 30 Tage)
SRUSHTI KHATAU am 31 Okt. 2021
Kommentiert: SRUSHTI KHATAU am 15 Nov. 2021
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'

Antworten (1)

Alamanda Ponappa Poovaya
Alamanda Ponappa Poovaya am 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.
  3 Kommentare
Alamanda Ponappa Poovaya
Alamanda Ponappa Poovaya am 12 Nov. 2021
You can refer to this link below, it has everything you need about app designer
Specifically to learn about events, refer below

Melden Sie sich an, um zu kommentieren.


Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by