Automatic Callback creation for UI Button
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Therry Beauge
le 18 Juin 2020
Commenté : Therry Beauge
le 24 Juin 2020
Hello there.I have a loop that automatically creates UI buttons based on a file that is read and the amount of instances in the file. I would like to now access those callbacks (or essentially make them) while in the loop. How can I go about this?
I am using MATLAB 202a.
0 commentaires
Réponse acceptée
Ameer Hamza
le 19 Juin 2020
You can use the ButtonPushedFcn property of the uibutton to assign it a callback. For example
btn = uibuttin();
btn.ButtonPushedFcn = @function_handle_name
5 commentaires
Ameer Hamza
le 22 Juin 2020
Can you create a small app which just creates a button and assign a callback function to it, similar to your current app? It will make it easy to see the issue happening in your code.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Interactive Control and Callbacks 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!