How to resize the app window screen in Matlab app designer?

조회 수: 8 (최근 30일)
Rupesh Uprety
Rupesh Uprety 2020년 6월 14일
댓글: shamal 2023년 5월 17일
I am working with Matlab app designer. whenever i run the app, i want it to automatically open in a full screen mode just like any other app. How do I do it?

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 6월 14일
Create the startup Function for your figure window and use the following code inside it
function startupFcn(app)
units = get(groot, 'Units'); % backup Units
set(groot, 'Units', 'pixels');
app.UIFigure.Position = get(groot, 'ScreenSize');
set(groot, 'Units', units); % restore original units
end
See the attached app.
  댓글 수: 3
Ameer Hamza
Ameer Hamza 2020년 6월 20일
I found that there is no need to set the Position property. You can get the same effect by maximizing the window. Also, add some delay so that all the components are loaded before maximizing the window
function startupFcn(app)
pause(1);
app.UIFigure.WindowState = 'maximized';
end
shamal
shamal 2023년 5월 17일
hi, i try it but i don't see full size

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by