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

31 vues (au cours des 30 derniers jours)
Cordelle
Cordelle le 1 Juil 2013
Commenté : Praneeti Mitra le 21 Avr 2021
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?
or
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,
Cordelle

Réponse acceptée

Tom
Tom le 1 Juil 2013
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.
  7 commentaires
Tom
Tom le 1 Juil 2013
You can set the figure size to the screensize:
set(handles.figure1,'Units','Pixels','Position',get(0,'ScreenSize'))
And from there resize the objects of the GUI.
Praneeti Mitra
Praneeti Mitra le 21 Avr 2021
Can someone help me with the same problem?

Connectez-vous pour commenter.

Plus de réponses (1)

Panu Pratumnopharat
Panu Pratumnopharat le 1 Jan 2017
Modifié(e) : Walter Roberson le 1 Jan 2017
GUI = figure('Color',[0.941 0.941 0.941],...
'Name','HAWTsimulator',...
'NumberTitle','off',...
'MenuBar','none',...
'Unit','normalized',...
'Position',[0 0 1 1],...
'outerposition',[0 0 1 1]);

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by