Appdesigner Panel Positions are wrong. How do I fix it?
조회 수: 23 (최근 30일)
이전 댓글 표시
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
Mirko Hrovat
2023년 9월 6일
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.
답변 (1개)
Mirko Hrovat
2023년 9월 6일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File 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!