MATLAB: Set GUI to screen size: set(handle​s.figure1,​’Position’​,get(0, ‘ScreenSize’));

maximizationscreen size

Hello,
I am writing a GUI and as many user I want it to be maximize as soon as the user launch it. I used GUIDE to do it: my GUI has 3 panels with a toolbar, following these advices Create tab with matlab using panel .
I put this line to the opening function
set(handles.figure1,'units','norm','Position',[0 0 1 1]);
Expecting of course to get the gui maximize. Unfortunately it is not the case, see figure below:
Any ideas ?
ML

Best Answer

Ok, I got the problem.
I was using the option proportional on Guide instead of user function. Then I added the code on the figure1_SizeChangedFcn which works.
Thank you !