I have a GUIDE gui made with MATLAB R2011a. Non of the following techniques has worked to move the gui on the screen:
1)use of
movegui('center')
in the main Figure's CreateFcn or the gui's Opening function
2) use of this code in Opening function:
%pixels
set( handles.figure_main, ... 'Units', 'pixels' );%get your display size
screenSize = get(0, 'ScreenSize');%calculate the center of the display
position = get( handles.figure_main, ... 'Position' );position(1) = (screenSize(3)-position(3))/2;position(2) = (screenSize(4)-position(4))/2;%center the window
set( handles.figure_main, ... 'Position', position );
3)or even simple commands of:
set(handles.figure_main,'Units', 'pixels'); set(handles.figure_main,'Position', [900 39 912 600]);
Any help is appreciated
Best Answer