Check if button was pressed in Matlab AppDesigner
Show older comments
Hello I'm developing an app on Matlab AppDesigner and I have several buttons. I want to do a certain code if the button before was pressed and another code if the previous button was not pressed. How can I solve this?
Accepted Answer
More Answers (1)
Eric Delgado
on 19 Sep 2022
0 votes
Another idea is to use "statebutton" instead "button" to get a more user-friendly GUI. And you can use just one callback to get more code readability. See code attached made on R2021b (if you are working on a different release of Matlab, you have to open App Designer and save the file before run it).

1 Comment
Adam Danz
on 19 Sep 2022
Great suggestion, @Eric Delgado
Categories
Find more on Develop Apps Using App Designer 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!