Re: Trouble maximizing windows on MS Windows



On 08/27/2012 06:27 AM, Jared Henley wrote:
I have a Gtk application that needs windows to be maximised at their
creation.  This is specifically because i) there's a lot of information
in tables that needs maximisation in order to deal with sensibly, and
ii) quite a lot of these windows are being opened (and closed) during
normal use.  (It's a forms-based database app).  I'm using Gtk3 via Python.

So I use the Gtk.Window.maximize() method to maximise a window, and it
works very well on native X11.  But if I run an X server on a Windows
machine (XP and 7 tested), the window is not maximised.

possible (not tested) the window has to exist before you can maximize it.

so register an idle callback function with g_idle_add() and maximize the
window in that idle callback and return FALSE.

that way gtk first paints the window on screen, and when done your idle
callback will be called and it will be maximized.

Olivier





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]