How to keep the original layout in the full screen or when maximizing the GUI of a MATLAB App ?
27 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kamal KHARROUBI
el 14 de Jun. de 2024
Comentada: Kamal KHARROUBI
el 19 de Jun. de 2024
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.
0 comentarios
Respuesta aceptada
Rik
el 15 de Jun. de 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 comentarios
Rik
el 19 de Jun. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!