How one can delete tab in figure?

15 ビュー (過去 30 日間)
Pavel M
Pavel M 2022 年 2 月 5 日
コメント済み: Will Reeves 2022 年 8 月 19 日
In muy GUI in App Designer I want to have option to delete selected Tab by the context menu. But function such
clear app.tab1
dont work.
How i may to delete tab with refreshing figure app?
f = figure;
tabgp = uitabgroup(f,'Position',[.05 .05 .3 .8]);
tab1 = uitab(tabgp,'Title','Settings');
tab2 = uitab(tabgp,'Title','Options');
In this example case figure dont refresh after command
clear tab1
clear tabgp

採用された回答

Voss
Voss 2022 年 2 月 5 日
clear deletes variables from a workspace. To delete graphics objects (including uitabs) you can use delete.
f = figure;
tabgp = uitabgroup(f,'Position',[.05 .05 .3 .8]);
tab1 = uitab(tabgp,'Title','Settings');
tab2 = uitab(tabgp,'Title','Options');
delete(tab1);
tab1 = []; % make sure nowhere else will refer to a deleted object
  1 件のコメント
Will Reeves
Will Reeves 2022 年 8 月 19 日
Please can you include a solution relating to the use of the app designer since it's not possible to delete app "properties"?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by