How to reproduce identical tab whenever button is clicked?
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Said Kemal
il 28 Mar 2023
Commentato: AYBARS DOGAN
il 23 Nov 2023
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 Commento
chrisw23
il 28 Mar 2023
...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.
Risposta accettata
Simon Chan
il 28 Mar 2023
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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!