I have created an app using AppDesigner Tool. I want to reproduce the tab shown in following figure in identical configuration whenever button is clicked. How can I achive this?

1 件のコメント

chrisw23
chrisw23 2023 年 3 月 28 日
...one of x possibilities
Store each uiControl state on button click in private properties (structure of your choice) and compare with current settings on next click. Define your initial tab setting in the startup function.

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

 採用された回答

Simon Chan
Simon Chan 2023 年 3 月 28 日

1 投票

Set the Callback of Button pushed function as follows:
% Button pushed function: Button
function duplicateTab(app, event)
obj = allchild(app.Tab); % Find all childrens from the 1st tab
newtab = uitab(app.TabGroup,'Title',app.Tab.Title); % Create a new tab with the same title
copyobj(obj,newtab); % Copy all objects to the new tab
end

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Develop Apps Using App Designer についてさらに検索

製品

リリース

R2022b

質問済み:

2023 年 3 月 28 日

コメント済み:

2023 年 11 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by