Appdesigner: How to to an action while a button is pushed (and hold)?

5 views (last 30 days)
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

Answers (1)

Németh Gergely
Németh Gergely on 4 Dec 2019
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

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!