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 个)

Németh Gergely
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

类别

Help CenterFile 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!

Translated by