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

5 ビュー (過去 30 日間)
Hieu Philip Hoang
Hieu Philip Hoang 2019 年 1 月 19 日
回答済み: Németh Gergely 2019 年 12 月 4 日
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 件のコメント
Verena Marterer
Verena Marterer 2019 年 10 月 16 日
Hi,
did you find a solution for your problem so far?
Cheers,
Verena:)

サインインしてコメントする。

回答 (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 Center および File ExchangeDevelop 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