Can I set a figure maximum in GUI layout editor?

2 views (last 30 days)
Hi all,
Could someone please tell me how to set and display a figure at maximum size or full screen when it first open? Although I drag the lower right corner of the figure to the lowest right corner of the screen, it wasn't full screen size when initializing.
Thanks in advance.

Accepted Answer

Geoff Hayes
Geoff Hayes on 11 Oct 2014
Khanh - if you are using GUIDE, then open the property inspector for the figure/GUI, and change the Units property to normalized, and the Position property to [0 0 1 1]. The first two elements of the position vector correspond to the x and y coordinate of the top-left corner of the figure/GUI; the third and fourth elements correspond to the width and height of the GUI respectively. Setting these values to one (and since units are normalized) allows you to set the GUI size to the screen size.
If you are not using GUIDE, then you can set the figure to be the full screen size as follows
h = figure;
set(h,'Units','normalized','Position',[0 0 1 1]);

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!