how to set togglebutton value from another togglebutton
Show older comments
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?
Accepted Answer
More Answers (1)
Helmut Riedel
on 22 Mar 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
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!