Consistent GUI screen sizing on laptop and monitor
Ältere Kommentare anzeigen
Hi, so I have a GUI that I mainly work on at the internship I have, where I use a 1920x1080 resolution monitor. I verified that Matlab was using this same resolution by doing the get(0,'screensize') command. However, I went to work on it at home on my laptop, which is also 1920x1080 resolution, and the layout for the GUI is all messed up. Furthemore, when I did get(0,'screensize'), it says the resolution is 1280x720 even though I'm positive my laptop's screen is 1920x1080 resolution. How do I fix this so that my GUI works on both my laptop and the monitor I work on? Is there some command I can do on my laptop where I can change the Matlab resolution to 1920x1080? Does it have something to do with the fact that my laptops screen is physically smaller than the monitor screen (13'' vs roughly 24'')?
8 Kommentare
Subhadeep Koley
am 9 Aug. 2019
Hi,
Can I know which MATLAB version you are using ? And also you built your GUI using GUIDE or appdesigner ?
Mason Dyess
am 14 Aug. 2019
Rik
am 14 Aug. 2019
Do you have display scaling enabled in Windows? It sounds like a high enough resolution for such a small screen that you have. I have never before had any issues in that regard, but that might be a cause.
Rik
am 19 Aug. 2019
Same issue with the app designer.
Did anybody know why Matlab get() gets 1280x720, differ from the actual 1920x1080?
Rik
am 19 Aug. 2019
I suspect this may have something to do with display scaling for high pixel density screens, but I haven't confirmed it. There is a 1.5x factor between those two, which is a common setting for display scaling.
Yair Altman
am 19 Aug. 2019
Please confirm that you are not connecting your laptop to an external monitor - in this case monitor 0 might refer to the external monitor and not your laptop (depending on your selected displays layout).
get(0,'MonitorPositions')
will show you the layout and size of all active monitors that Matlab recognizes.
Mason Dyess
am 20 Aug. 2019
Rik
am 20 Aug. 2019
I don't know how you could solve this, but I suggest you contact Mathworks support to see if they consider this a bug.
Akzeptierte Antwort
Weitere Antworten (1)
Chidvi Modala
am 13 Aug. 2019
0 Stimmen
I am assuming that you are using GUIDE to build your GUI.
1 Kommentar
Mason Dyess
am 14 Aug. 2019
Kategorien
Mehr zu Environment and Settings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!