Effacer les filtres
Effacer les filtres

How to keep the original layout in the full screen or when maximizing the GUI of a MATLAB App ?

12 vues (au cours des 30 derniers jours)
Hello everyone,
I am desinging an App in the MATLAB App Designer, I am using MATLAB R2023a, and I am working on a Windows operating system.
After finishing the design of my App, I have noticed that when running the App, the layout of the designed GUI is lost when the GUI is on full screen or when it is maximized. Please see the attached Capture1 and Capture2 for the layouts of the GUI (Capture1 shows the layout when the GUI is minimised, this is the original layout that I have designed, and Capture2 shows how the layout is changed when the GUI is on full screen or when it is maximized).
I want that the GUI keeps the original layout that I have set when I was designing the App in the App designer, when the GUI is on full screen or when it is maximized.
I have found on some answers of MATLAB Central that I Should select for WindowState "fullscreen" or "maximized" and that I should also select "Resize" and "AutoResizeChildren" in the Settings of POSITION. I have done all that, please see the attached Capture3, but I still have the same problem.
Does anyone have any solution for this problem ?
Many thanks to everyone in advance.
Capture1
Capture2
Capture3

Réponse acceptée

Rik
Rik le 15 Juin 2024
You should set the units to Normalized. That will scale the sizes of the buttons as you expect.
There is an art to this, since you might want your GUI to look good on VGA, as well as 4k.
You could consider using the ResizeFcn property to scale the font size as well.
  5 commentaires
Rik
Rik le 19 Juin 2024
You need to set the Units property to 'Normalized'. Normally something this should do it:
app.object.Units='Normalized';
Although I admit I have never tested this in an AppDesigner app.
Kamal KHARROUBI
Kamal KHARROUBI le 19 Juin 2024
Ok Rik, I will try it.
Thank you so much for your precious help !

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by