MATLAB: Size of maximized figure

figure sizemaximize

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')?

Best Answer

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 .