Appdesigner: How to to an action while a button is pushed (and hold)?
5 次查看(过去 30 天)
显示 更早的评论
Hey guys
I want my app to do an action, while I'm holding on the button. Releasing the utton should stop the action again. Is there any way to do so?
As the Button normally firstly calls the callback function when the button is pressed and released.
I want to let the callback function run while the button is pressed.
Kind regards
1 个评论
回答(1 个)
Németh Gergely
2019-12-4
Hi,
I just accidentally run into your post. I would use a state button instead of the push button so as you click it remains at the toggled on state. Then the next click toggles it off and while loop will exit.
I hope that it is applicable for you.
Cheers,
Gergely
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!