From: Ashleigh on
Hi,
I'm looking to have my GUI load maximized, but I'm having a few problems.

1) When I use any of the suggestions I've seen on here so far, it cuts off the bottom of my screen or positions itself so that there it about a centemeter of space around the right and top of the page (it doesn't REALLY maximize it either, just makes it screen sized).
2) Even when I just use that, if I resize it while working on it, as soon as I press a button it goes back to how it originally loaded. Is there a different place I should be putting the code other than the opening fcn?

Thanks for your help!
Ashleigh
From: matt dash on
"Ashleigh " <chiefsoccer12removethis(a)aim.com> wrote in message <hnr1dj$4g2$1(a)fred.mathworks.com>...
> Hi,
> I'm looking to have my GUI load maximized, but I'm having a few problems.
>
> 1) When I use any of the suggestions I've seen on here so far, it cuts off the bottom of my screen or positions itself so that there it about a centemeter of space around the right and top of the page (it doesn't REALLY maximize it either, just makes it screen sized).
> 2) Even when I just use that, if I resize it while working on it, as soon as I press a button it goes back to how it originally loaded. Is there a different place I should be putting the code other than the opening fcn?
>
> Thanks for your help!
> Ashleigh


1) If there is a solution to this, i'd love to hear it. I've never gotten further than you have here.
2) That seems strange, but you might have better luck if you do your sizing in the layoutfcn, which GUIDE does not create so you'll have to make one yourself by editing the top portion of your gui file with the function name, and then creating the function that opens the .fig file and resizes it.
From: Oliver Woodford on
"Ashleigh" wrote:
> I'm looking to have my GUI load maximized, but I'm having a few problems.

Have you tried the following?:
http://www.mathworks.com/matlabcentral/fileexchange/25471-maximize
From: Jan Simon on
Dear Ashleigh!

> I'm looking to have my GUI load maximized, but I'm having a few problems.

Which Matlab, which OS?

In addition I had the problem, that I cannot set the figure size such that the inner position fills the screen:
S = get(0, 'ScreenSize');
figure('position', S)
This always shows the menubar. If the outer position is off the screen, the window is moved vertically by a number of pixels which is reproducible, but not linear depending on the wanted position. Scary.
Under Matlab 6.5 I had some success, if I set the figure position twice -- without DRAWNOW between the calls. Wow.

Calling the Windows-Functions with the tools from the FEX did not help. Nice maximizing, always on top, minimize etc - everything works fine, but the resizing fails even in the C-mex calling SetWindowPos(). Finally I had success by setting the SWP_NOSENDCHANGING flag. Then the window position was not disturbed by Matlab any longer.

Kind regards, Jan