How can I use a switch in AppDesigner to call different functions?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
xX_MatlabMaster_Xx
le 28 Nov 2017
Réponse apportée : Mukul Rao
le 5 Déc 2017
Hi,
I've got two functions in the callback of a button in appdesigner. Moreover I've got a toggle swtich that can have to states.
I want that, depending on the state of the switch, the button runs one of the functions. Would this work with a 'if' statement for the swtich value/state inside the button callback ? If yes, how?, If no, how as well?:)
Thank you very much!
0 commentaires
Réponse acceptée
Mukul Rao
le 5 Déc 2017
Hi, you can basically call one of the two functions within the button callback based on the state of the toggle switch (app.ToggleSwitch.Value). I've attached a very rudimentary example illustrating this.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Desktop dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!