Consistent GUI screen sizing on laptop and monitor
36 次查看(过去 30 天)
显示 更早的评论
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 个评论
Rik
2019-8-20
I don't know how you could solve this, but I suggest you contact Mathworks support to see if they consider this a bug.
采纳的回答
Chidvi Modala
2019-8-14
You can set all the 'units' properties of all the controls to 'normalized'. You can also set the Position property to [0 0 1 1], if you want full screen.
6 个评论
Rik
2019-8-14
@Adam, actually, that misses a point. That presuposes that all sizes are correct, which is apparently not the case. So Mason would need to run this code on a computer where the sizes turn out correct, and then use the result to adapt the code to generate the GUI with normalized units.
(although to be fair, it isn't entirely clear to me why the layout would break, instead of everything just being scaled down and all proportions staying correct)
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!