Hi Jackson,
From what I can gather, you are trying to incorporate App A with App B in such a way that when App B is opened from App A, App B opens on the same window as App A.
Here’s a workaround I was able to find to do the same:
Step 1: Add tab groups to App A (You can find tab groups in containers section)
Step 2: Strech the tab group window vertically so that tab labels aren’t visible in the main window.
Step 3: Add a callback to the button of your choice to switch between tabs.
% Button pushed function: app1Button
function switchTheTab(app, event)
set(app.TabGroup, 'SelectedTab', app.Tab2)
end
The primary drawback of this workaround is that your application will not adjust dynamically to screen sizes, and attempting to modify the window dimensions of your app may result in the visibility of the tab labels.
To tackle this, you can add an event listener which should change the size of the tab group when the size of the window is changed, this can be done using the “SizeChanged” event name.
Learn more about tab groups and event listeners using the following links:
- Overview Events and Listeners: https://www.mathworks.com/help/matlab/matlab_oop/learning-to-use-events-and-listeners.html
- TabGroup Properties: https://www.mathworks.com/help/matlab/ref/matlab.ui.container.tabgroup-properties.html
I hope this helps, thanks!