Link multiple edit fields in app designer

4 ビュー (過去 30 日間)
William
William 2023 年 1 月 19 日
コメント済み: Jiri Hajek 2023 年 1 月 24 日
I have a parameter which is accesible through a edit field. I would like this parameter to also be accessible in another tab. Is it possible to somehow link two edit fields or make a second instance of the same edit field?

採用された回答

Jiri Hajek
Jiri Hajek 2023 年 1 月 19 日
Hi, you can use a callback on the first edit field (ValueChangedFcn). In this callback function, you simple assign the new value to the target edit field value.
  2 件のコメント
William
William 2023 年 1 月 24 日
Hi. Thanks for the answer. Ill probably do what you suggested. The problem is that it scales badly. What if i want 3 edit fields. Then i have to create at least 4 callbacks to make sure all fields are in agreement.
It just seems like a feature that could be generally usefull.
Jiri Hajek
Jiri Hajek 2023 年 1 月 24 日
Yes, I see your point. There might be a possibility to link directly properties of you objects using linkprop. But actually I'm not sure if this is possible for app components. I have used it for axes properties though and it worked fine.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by