Effacer les filtres
Effacer les filtres

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

6 vues (au cours des 30 derniers jours)
Hieu Philip Hoang
Hieu Philip Hoang le 19 Jan 2019
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 commentaire
Verena Marterer
Verena Marterer le 16 Oct 2019
Hi,
did you find a solution for your problem so far?
Cheers,
Verena:)

Connectez-vous pour commenter.

Réponses (1)

Németh Gergely
Németh Gergely le 4 Déc 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

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by