Migrated GUIDE to App Designer -- App partially off screen

조회 수: 13 (최근 30일)
Douglas Anderson
Douglas Anderson 2019년 9월 8일
댓글: Douglas Anderson 2019년 9월 10일
Hello,
Just started using App Designer after years with GUIDE. Succesfully migrated a small test program, but when run, it starts with half of the app off the top of the screen.
Nothing special in terms of position at the start. GUIDE .fig has four buttons, a few text boxes two axes, and a button group.
Any idea?
Thanks.
Doug

채택된 답변

Adam Danz
Adam Danz 2019년 9월 9일
Open the app in appdesigner.
In the component browser, select the main figure.
Then check the "Position" property and determine if has a large vertical location (2nd element of the position vector).
190909 193238-Migrated GUIDE to App Designer -- App partially off screen - MATLAB Answers - MA.jpg
  댓글 수: 3
Adam Danz
Adam Danz 2019년 9월 10일
편집: Adam Danz 2019년 9월 10일
Yeah, that looks like it was developed on a fairly large monitor (or dual monitor). Unfortunately normalized figure units are not supported with figures created with the uifigure function (and therefore, app figures).
The default position when you start a new app is [100,100,640,480]. And you are correct that this is the left, bottom, width, height pixel values. Based on your width and height measurement, starting it at (100,100) should be fine. I tested it on a laptop with a small monitor and it fits well. If anything, you could decrease the 'bottom' coordinate to 50 for safety.
[addendum]
If you wanted to scale the GUI based on the user's monitor size, you could insert the line below into the app's startup function and then reposition the UIfigure from within the startup function before it appears. But I do not recommend doing this due to the use of dual monitors. Instead, IMHO I think it's safer to design your app on a set position and size that would be safe for all users and allow the user to drag the figure window to where s/he wants after it's created.
get(0,'ScreenSize')
Douglas Anderson
Douglas Anderson 2019년 9월 10일
Thank you, Adam! Very helpful.
Tryed it, and it works.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by