App Designer - Screen resolution
Mostrar comentarios más antiguos
I have an app with 3 tabs and several graphs on each tab built in the app designer (not GUIDE). When I connect my laptop to a screen with resolution 1920x1080 I can see the app perfectly, but when using my laptop screen (1366x768) one third of app is not visible.
I see there are some commands to get the screen size [ie get(0,'ScreenSize')] but not sure where to use this command in the app designer so that when I open it, I can visualize it correctly no matter the screen resolution of the computer. Thanks!
3 comentarios
Abdul Raouf Tajik
el 28 de Sept. de 2017
Dear Gabreila, Were you able to solve the problem? I am facing the exact same problem!
Gabriela
el 13 de Oct. de 2017
Chong Cao
el 2 de Nov. de 2017
same problem, dont know how to due with
Respuestas (3)
Melissa Williams
el 12 de Dic. de 2018
1 voto
Hi Gabriela,
Starting in R2018b, you can turn Scrollable on the UIFigure and you should be all set, no need to calculate screen size or manually add sliders.
4 comentarios
Giada Staniscia
el 26 de Jun. de 2019
I made everything scrollable but it did not solve the problem.
Melissa Williams
el 26 de Jun. de 2019
HI Giada,
It's possible you are hitting a bug we are aware of. If you are able to upgrade to R2019a, autoresizing all components smaller when the app is resized smaller has been added. You should no longer need to resize every component smaller in the start up function.
Giada Staniscia
el 28 de Jun. de 2019
I still have the exact same problem in R2019a.
Melissa Williams
el 28 de Jun. de 2019
The app will launch at the size you set for the UIFIgure, unless you write code to make it smaller. But if you make the app smaller the components inside it should automatically resize and reposition themselves. Make sure autoresize children property is on for your figure and tabs.
Sally Al Khamees
el 13 de Jul. de 2017
0 votos
Hi Gabriela, You might want to try writing a callback that activates when the app is loaded.See the customer the following link for more details.
I hope this helps
3 comentarios
Elmar Shayahmetov
el 12 de Oct. de 2017
But how to get screen size in app designer?
Bhavanithya Thiraviaraja
el 30 de Nov. de 2018
Editada: Bhavanithya Thiraviaraja
el 30 de Nov. de 2018
get(groot,'Screensize')
Joseph Santoro
el 12 de Jul. de 2019
I would love to try this solution since I am experiencing the same problem in 2016a but I have no option to create a StartupFCN callback function on my UIFigure. Please see the attached screenshot. Any idea why this is happening?

Arsalan jamialahmadi
el 15 de Jul. de 2019
0 votos
Hi Gabriella,
I used to have exact same problem but eventually could solve it.
What I think should be better documented is the fact that every thing you create in a page in your App Designer needs to be put inside a panel, otherwise auto resize function does not work properly. You also need to be very careful with the "Inner" size of panels and not place any control interfering with this area.
So for me it works by applying above formula plus making the "Scrollable" and "AutoResizeChildren" checked for all controls including the main page of my app.
Categorías
Más información sobre Develop Apps Using App Designer en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!