App Designer messes up component layout after opening the app

38 views (last 30 days)
I'm having a problem understanding what is going on with my app in App Designer tool. What is happening is that after I save file and re-open it in a new tab (or restart the tool and open the file), component layout (how components are arranged on the grid) gets messed up randomly or even some components get deleted and some added on random places.
I'm not sure whether this is a bug for this version (I'm using 2019b) or I'm doing something I shouldn't.
This is as it should look in App Designer (after saving, before closing):
And this is how it looks after re-opening:

Answers (3)

Image Analyst
Image Analyst on 3 Jun 2022
I just went through a long debugging with two different tech support people with R2022a. I had an app migrated over from GUIDE using the migration tool. The panel and axes were messed up - it put them underneath the buttons and panels and things.
To make a long story short, here was the solution:
  1. The migration tool put the axes over touching the right edge of the window in App Designer. Move or resize your axes so that no control touches the edge of the main app window.
  2. The migration tool put a call to a "movegui" function in the startup function. This caused the app to un-maximize and relocate partly off screen, even though the WindowState property of the figure in App Designer said to startup 'maximized'. Delete or comment out the call to movegui.
After that, everything worked fine. Or as fine as App Designer can be in its current version. I have a list of a dozen other annoyances with it that I've let the developers know about.
  2 Comments
Luca Re
Luca Re on 1 Dec 2023
Edited: Luca Re on 1 Dec 2023
hi, i try fo find "movegui" but i don't find it
Image Analyst
Image Analyst on 2 Dec 2023
Then you were not converting a GUIDE application into App Designer.

Sign in to comment.


Matthew Osborne
Matthew Osborne on 13 Jan 2023
I have noticed this problem in Matlab 2019b that if you delete components in the GUI and save the app the executable is ok but when reopening in appdesigner all the deleted components reappear and the code is cluttered with mulitple blank app. references. It's like it imports all the deletion history back in so it's very annoying.
The only wok around so far is to start a new app and only drag in and build the latest design features you want and delete the old working files.
  2 Comments
Arun Raghupathy
Arun Raghupathy on 20 Jan 2023
I have the same problem with both R2022a and R2022b.
I deleted components in the Component browser and saved the app, and the execution looked ok but when reopening in appdesigner all the deleted components reappeared. The Component browser shows mulitple blank app. references.
By the way, blank app references seem to grow even if you clean up the blank app references and do a "save as" another app filename. And, at some point, it just refuses to load due to too many blank references.
For now, it appears I have to write the code again for everything that I have fixed since there is no way of opening the app now. Very frustrating and painful.
Rusul Altaay
Rusul Altaay on 17 Mar 2023
I'm having the same issue with 2022b except that the components are comming back with the same name over and over again. It can not be deleted

Sign in to comment.


Luka Gacnik
Luka Gacnik on 3 Jun 2022
It seems there is an issue (or was just on my PC) with R2019b version of Matlab. I installed R2017b, where this issue is not a problem anymore. There might be a bug in other version.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!