how to set togglebutton value from another togglebutton
Mostrar comentarios más antiguos
Hello,
i have two togglebuttons in my gui which i created from guide.
i want when i press the first one then automatically pressed and the second one.
in the first toggle button i set:
set(handles.togglebutton2, 'Value', 1);
The togglebutton2 seems to be pressed,however the code in the togglebutton2 doesn't execute.
Any idea what to do to execute the code in the togglebutton2 when i press the first one?
Respuesta aceptada
Más respuestas (1)
Helmut Riedel
el 22 de Mzo. de 2017
Hi Alex,
I implemented a function togglegroup.m that can toggle 5 togglebuttons with a master togglebutton. Interestingly, the actual callback function has not to do anything, since the button states (and their changes/toggles) are read and set in the main function.
Hope that helps.
Cheers,
Helmut
Categorías
Más información sobre Interactive Control and Callbacks en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!