everything is in the title: if one would like to open his/her program window in full-screen, how would he/she do?
Thank you!!
% Call special function that The Mathworks gave me to maximize the
window and leave it in focus.
% minfig(F,1) % minimizes the figure window for the figure
with handle F
% minfig(F,0) % restores figure F if F is minimized
% maxfig(F,1) % maximizes the figure window for the figure
with handle F
% maxfig(F,0) % restores figure F if F is maximized s =
figstate(F) % returns the state of figure { Maximized | Minimized |
Normal }
% Note: This works only if the window is already displayed. If
not, it will throw a java exception.
if exist('axesChildHandle', 'var')
maxfig(handles.figMainWindow, 1) % Maximizes the figure window
for the figure with handle in the first argument.
end
Put it in the OutputFcn() function of your GUI.
what exactly is "full screen"?
- The outer position with window border fills the screen.
- The inner position fills the screen, so the window border is invisbile, but the taskbar is still visible.
- Even the taskbar is invisible and the AXES([0, 0, 1, 1]) object fill the complete screen.
There are some problems using standard Matlab methods:
pos = get(0, 'ScreenSize');
figure('position', pos); % ?? Border is still visible?!
figure('outerposition', pos); % Taskbar is visible
But there are some submissions in the FEX, which solve these two jobs. For the third problem, I found a solution only for Windows:
Create a MEX which set the window positions to the desired size, and set the SWP_NOSENDCHANGING flag in SetWindowPos.
Good night, Jan
by full-screen, I mean that as soon as the user click on the open button, the popup must be as large as possible (but keeping the scroll bar etc.)
I have to admit that I am pretty new to Matlab, I only used Simulink in the past and this is my first gui project.
Thank you,
Stephane