Borrar filtros
Borrar filtros

Appdesigner Panel Positions are wrong. How do I fix it?

13 visualizaciones (últimos 30 días)
Dc215905
Dc215905 el 9 de Jul. de 2021
Respondida: Mirko Hrovat el 6 de Sept. de 2023
Hello,
I have layed out all of the panel information in design view; however, when I open the app, certain panels move to positions that are not ideal. The Image below shows how the panels are layed out in desgin view (left image) and what happens when I open the app (right image). I will say, that the scrambling is not an issue in matlab 2021a , but it is an issue in 2020a. Any suggestions?
  1 comentario
Mirko Hrovat
Mirko Hrovat el 6 de Sept. de 2023
I also have a similar problem and I am using 2022a release.
In the code created by app designer, I have " app.NContours.Position = [151 113 30 22];"
In the layout the position of the control is " [163,50,55,22]"
why don't they match?
Also, in this app this is the only control that seems to be off.

Iniciar sesión para comentar.

Respuestas (1)

Mirko Hrovat
Mirko Hrovat el 6 de Sept. de 2023
I found one workaround. Copy the control and place it in the same panel so know you have two controls with slightly different names. Rename the old control (like adding "_bad" to it), then rename the new control to your original name.
Now you have to search through your code replacing "_bad" in all of the app variables. You will also have to add the callbacks you need copying the callback code you used in the original control. After all this you can then delete the "_bad" control. This deletes the old callbacks as well.
I presume a link to the control's position might have broken. The new control behaves as expected.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by