(App Designer) change callback of item / add new callback to existing item

11 ビュー (過去 30 日間)
Dominik Müller
Dominik Müller 2020 年 12 月 7 日
編集済み: Mario Malic 2020 年 12 月 7 日
Hi folks,
I have programmed a GUI and added some items to a callback by right clicking them and select existing callback. Now I want to change the callback for some of the items but I'm not able to change the callback. If I right click the item all it shows is 'Go to XYCallback'. Is there a way to change the callback of the existing item or add a new one for it?
Thanks in advance.

採用された回答

Mario Malic
Mario Malic 2020 年 12 月 7 日
編集済み: Mario Malic 2020 年 12 月 7 日
Hello,
Each component has its own callback, and only thing that you need to do to change it is to rename it, everything related to its name will be changed automatically.
If you want to delete the callback, find it in Code Browser section (top left) and under Callbacks, delete it. I don't think it's possible to have multiple callbacks so you'll have to embed your code into one.
Answer edit:
Click the component, on the right-hand side in a Component browser, in the section Callbacks, just below the list of components, there's ValueChangedFcn dropdown menu where you can select/remove or create another callback.
  4 件のコメント
Dominik Müller
Dominik Müller 2020 年 12 月 7 日
Ah okay, got it.
Didn't know it' possible to set/connect/change callbacks for items via this menu.
THANK YOU!
Mario Malic
Mario Malic 2020 年 12 月 7 日
You're welcome. I also had the same issue once, until one of other members pointed it out.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreate Custom UI Components についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by