Filter löschen
Filter löschen

Resizing GUI and components to keep original layout.

23 Ansichten (letzte 30 Tage)
awezmm
awezmm am 3 Sep. 2017
Kommentiert: Image Analyst am 15 Apr. 2020
How do I automatically resize my GUI for different window screen resolutions? I've read other answers but they only say to make the GUI full screen or some other size relating to the size of the whole screen. However, my static texts do not resize even though I have them checked as normalized. How can I make sure everything resizes automatically to account for any screen changes?

Antworten (1)

Image Analyst
Image Analyst am 3 Sep. 2017
In GUIDE, make sure all your components have a Units property of 'normalized'. Then, in your opening code, if you have Windows, call MaximizeFigureWindow (attached). If you don't have Windows, use this code that makes the window larger but doesn't technically "maximize" it.
% Set up figure properties:
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);
% Get rid of tool bar and pulldown menus that are along top of figure.
% set(gcf, 'Toolbar', 'none', 'Menu', 'none');
% Give a name to the title bar.
% set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
  6 Kommentare
zhiying zhou
zhiying zhou am 15 Apr. 2020
how to do when i use MATLAB Appdesigner to create app?
Image Analyst
Image Analyst am 15 Apr. 2020
I think it uses app instead of handles. So try
app.btnGo.FontSize = 20;

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by