필터 지우기
필터 지우기

Help with Programmatically Duplicating Tabs in MATLAB App Designer

조회 수: 6 (최근 30일)
David
David 2024년 3월 27일
댓글: David 2024년 3월 28일
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

답변 (1개)

Cris LaPierre
Cris LaPierre 2024년 3월 27일
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."

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by