[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] how do I maximize the window?
On Sun, Oct 14, 2007 at 10:01:32AM -0400, inhahe wrote:
> hmm, I'm having a problem with this. when i maximize, the title bar
> goes into the right place, etc., but the actual viewing space is a
> little too far up. it stops, with no border, a few pixels above the
> taskbar, and starts a few pixels above the title bar but behind it so
> stuff is covered up by the title bar. is there any solution to this?
>
Does it work correctly when you click the maximize button manually?
The call to SDL_Maximize() is equivalent.
To make resizing work you, you have to handle the Pygame VIDEORESIZE
event and ultimately call pygame.display.set_mode() with the value of
event.size.
I sometimes find it all a bit tricky to get right, what with potentially
having to recreate all your surfaces again,
cheers,
John.
> On 10/14/07, John Popplewell <john@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> > On Sun, Oct 14, 2007 at 04:55:14AM +0000, Richard wrote:
> > > How do I maximize the pygame window or start it maximized? not fullscreen, just
> > > maximized. by code, not by clicking on the maximize button. i can't find a way
> > > to do this. if there's really not a way to do it, that's kind of disappointing.
> > Hi,
> >
> > you can't using a built-in Pygame function. There is iconify() but no
> > corresponding restore() or maximize(). It is a limitation of the
> > underlying SDL library, which is being fixed in SDL-1.3 (or SDL-2).
> >
> > For now, I use the ctypes module to call the platform-specific
> > functions:
> >
> > <snipped!>
> >
> > regards,
> > John.
> >
> >