MATLAB Answers


How do you enable a GUI to adjust to fit screens of varying resolution

Cordelle 님이 질문을 제출함. 1 Jul 2013
최근 활동 Walter Roberson 님이 편집함. 1 Jan 2017
I created a GUI in Guide and I want my GUI to adjust to fit screens of different varying resolution, because my application will be used on different computers.
Is there a way to allow this guide? If so, how?
Is there a few lines of code need to enable this feature? If so, where can i find examples of the code?
Thank you in advance,

  댓글 수: 0

로그인 to comment.

답변 수: 2

Answer by Tom
on 1 Jul 2013
 Accepted Answer

In GUIDE, under Tools -> GUI options you can specify the resizing of the figure, including your own resize function.
You might also want to consider this FEX Submission.

  댓글 수: 6

표시 이전 댓글 수: 3
try running it in the command line - it will give you the screen size in pixels. Yes, or you can change them when the GUI loads, for example in the OpeingFcn:
Once im given the screen size, how can i use the info to allow my GUI to adjust to any screen itself?
You can set the figure size to the screensize:
And from there resize the objects of the GUI.

로그인 to comment.

Answer by Panu Pratumnopharat on 1 Jan 2017
Edited by Walter Roberson
on 1 Jan 2017

GUI = figure('Color',[0.941 0.941 0.941],...
'Position',[0 0 1 1],...
'outerposition',[0 0 1 1]);

  댓글 수: 0

로그인 to comment.

Translated by