Help with Programmatically Duplicating Tabs in MATLAB App Designer

17 vues (au cours des 30 derniers jours)
David
David le 27 Mar 2024
Commenté : David le 28 Mar 2024
Hello MATLAB Community,
I am working on a MATLAB App Designer application where I have a specific tab layout that I would like to duplicate multiple times within the same app. The tab I'm looking to duplicate is set up with a variety of UI components (buttons, edit fields, axes, etc.) and is configured with specific callbacks and properties.
I attached an example of the app.
Objective:My goal is to create new tabs programmatically, each a duplicate of an existing "master" tab, and then run individual scenarios within each of these new tabs.
Challenges Faced:
  • I am aware that MATLAB App Designer does not support the copyobj function to directly clone UI components.
  • I am looking for a method to efficiently replicate the layout and functionality of my "master" tab without manually adding and configuring each UI component for every new tab.
  • Managing dynamic content and runtime state across duplicated tabs is also a concern.
Questions:
  1. Is there an established pattern or best practice for duplicating tabs in MATLAB App Designer?
  2. How can I ensure that the dynamic state and data associated with components in the original tab are correctly initialized in each new tab?
  3. Are there any utility functions or undocumented features that could simplify this task?
Thank you in advance for your help!
Best regards,
David Sabag

Réponses (1)

Cris LaPierre
Cris LaPierre le 27 Mar 2024
I think you might find this video helpful: Dynamically Adding Components to My MATLAB App
In the summary, it says "Specifically, I want the number of tabs in a tab group to change based on the data."

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by