In the app, I want to share a callback between two buttons (app.Button1 and app.Button2). However, I want the action to be slightly different if Button1 is pushed vs Button2: something on the order of x=1 vs x=3.
Is there a way to detect, in the callback, which button triggered it?
(Matlab 2018a)

2 件のコメント

Geoff Hayes
Geoff Hayes 2018 年 5 月 18 日
Jessica - what does the signature for your callback look like? Isn't there a src input parameter?
Jessica Hiscocks
Jessica Hiscocks 2018 年 5 月 19 日
Not so far as I can tell- that seems to only apply if you create the button programmatically after the app is running.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Interactive Control and Callbacks についてさらに検索

質問済み:

2018 年 5 月 18 日

コメント済み:

2018 年 5 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by