WORKAROUND 1:
Use uigridlayout to place and resize the components, instead of relying on auto resize:
- In AppDesigner, open the app, and right click on the LeftPanel (in an empty space, not on a component), and select "Apply Grid Layout". This will insert a uigridlayout between the LeftPanel and the components.
- Adjust the grid configuration as needed.
- Repeat for the RightPanel.
WORKAROUND 2. (not as robust workaround 1 as the amount of pause is not deterministic).
Add the following at the beginning of the startupFcn:
app.LeftPanel.AutoResizeChildren = 'off';
app.RightPanel.AutoResizeChildren = 'off';
drawnow;
pause(2);
app.LeftPanel.AutoResizeChildren = 'on';
app.RightPanel.AutoResizeChildren = 'on';
