Effacer les filtres
Effacer les filtres

multiple actions following @(src,event) in uicontrol

3 vues (au cours des 30 derniers jours)
feynman feynman
feynman feynman le 10 Mar 2024
Commenté : Voss le 10 Mar 2024
How to add another action or function to the following
Button=uicontrol('Style','pushbutton', 'String','pause','Position',[1800 60 100 100], 'Callback',@(src,event)continue);
so that it becomes sth like
Button=uicontrol('Style','pushbutton', 'String','pause','Position',[1800 60 100 100], 'Callback',@(src,event){continue,close});

Réponse acceptée

Voss
Voss le 10 Mar 2024
Define a function that has whatever code in it you want.
Then make that function the button's callback:
Button=uicontrol('Style','pushbutton', 'String','pause','Position',[1800 60 100 100], 'Callback',@(src,event)your_function);
  4 commentaires
feynman feynman
feynman feynman le 10 Mar 2024
perfect, thanks
Voss
Voss le 10 Mar 2024
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by