Resize automatically GUI to screen resolution

2 次查看(过去 30 天)
Hello guys,
I made a GUI through Guide and a script linked to it. This GUI was based on a 1080p screen resolution but I would like to resize this automatically depending on the user screen resolution. Not only the overall shape, but also the text, axes, and other elements, is it even possible?
Thanks! :)

回答(1 个)

Image Analyst
Image Analyst 2015-3-31
See my attached function (thanks to Yair Altman) for the best way. Make sure all the 'units' properties of all the controls on your gui are set to 'normalized'.
Or else make it the screen size, but without maximizing, by doing this:
% Enlarge figure to full screen, but not actually officially maximized.
set(gcf, 'Units', 'Normalized', 'Outerposition', [0, 0, 1, 1]);

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by