Can I set a figure maximum in GUI layout editor?

2 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Geoff Hayes
Geoff Hayes il 11 Ott 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]);

Più risposte (0)

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by