(App Designer) Can I trigger a callback or event when the user switches tabs?
10 ビュー (過去 30 日間)
古いコメントを表示
Anne
2018 年 6 月 14 日
コメント済み: Vignesh Somasundaram
2021 年 12 月 20 日
Background: I'm using App designer to build a GUI. Currently, I have a few tabs in my GUI. One tab is dedicated to translating and creating test locations ('Translation' tab). The test locations are saved in a ListBox using the Items and ItemsData properties. Another tab ('Testing' tab) is dedicated to running a test at one (or multiple) test location(s).
What I would like: When the user switches to the 'Testing' tab, the 'Translation' ListBox Items and ItemsData properties will populate the 'Testing' Listbox's Item and ItemsData properties. Basically, when the user switches tabs, they will see the saved test locations from the previous tab.
Notes: I thought I could add a callback directly to the tab. But the only callback function suggested by app designer for is a 'size changed' function. (picture attached)
I can see at least 2 ways to accomplish updating the 'Testing' ListBox without triggering on a tab transition, but I just wanted to know if it was possible?
Thanks!
0 件のコメント
採用された回答
Jens-Christian Meiners
2018 年 6 月 16 日
The tabgroup in which your tabs reside should have the callback that you're looking for: SelectionChangedFcn. It is called whenever the user changes the tab. There you can query what the newly selected tab is with the tabgp.SelectedTab property, and update your listbox if desired.
2 件のコメント
Vignesh Somasundaram
2021 年 12 月 20 日
How to link SelectionChangeFcn to tabs created using uitable ?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!