Borrar filtros
Borrar filtros

multiple actions following @(src,event) in uicontrol

3 visualizaciones (últimos 30 días)
feynman feynman
feynman feynman el 10 de Mzo. de 2024
Comentada: Voss el 10 de Mzo. de 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});

Respuesta aceptada

Voss
Voss el 10 de Mzo. de 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 comentarios
feynman feynman
feynman feynman el 10 de Mzo. de 2024
perfect, thanks
Voss
Voss el 10 de Mzo. de 2024
You're welcome!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by