Size of maximized figure?
3 次查看(过去 30 天)
显示 更早的评论
I'd like to find out the size (in pixels) of a maximized GUI figure on different monitors programmatically in order to rescale a GUI accordingly. Since the sizes one gets with get(0,'Screensize') and the actual size of a maximized window are different, the Screensize seems not to help too much here. Also using the 'OuterPosition' of a figure doesn't really help because one still doesn't know what the limits for GUI elements are.
Is there any other way to find the actual maximum size of a figure than to create a figure, maximize it (using one of the FEX-solutions) and "measure" its size with get(fig_handle,'Position')?
0 个评论
采纳的回答
Walter Roberson
2012-2-13
No, you need to get() the actual position. The size of the maximized figure depends not just on the operating system (Windows, Linux) but on points such as whether you have your Windows toolbar on the side or the top/bottom .
0 个评论
更多回答(1 个)
Image Analyst
2012-2-13
I use maxfig() by the Mathworks but it looks like they removed that since I can't find it anymore. In that case, the best Option may be Jan Simon's WindowAPI: http://www.mathworks.com/matlabcentral/fileexchange/31437
2 个评论
Friedrich
2012-2-13
Its still there:
http://www.mathworks.com/support/solutions/en/data/1-3MY8PN/index.html
Jan
2012-2-13
WindowAPI can maximize the inner and outer position of figure to the full area or the working area (taskbar is visible). Unfortunately it works under Windows only. But you find some other useful links to FEX submissions which use Java such that they are expected to work under Mac and Linux also.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!