Centering a Tkinter Toplevel

Grant Edwards grante at visi.com
Thu Jun 28 10:59:42 EDT 2001


In article <3B3A75CE.DD40FF11 at ces.clemson.edu>, Schaefer, F. wrote:
>Hi,
>
>I was wondering how it could be possible to have a 'hello-screen'
>while the rest of the modules are loading. Unfortunately, I was
>to able to find out how to determine the WM-Screensize.
>Does anybody know how to do this in Tkinter ?

One of my dialog boxes does this:

   xpos = parent.winfo_screenwidth()/2 - 120

Where parent is the root window.

I would guess that there's a winfo_screenheight() method also,
but I've not actually tried it.

-- 
Grant Edwards                   grante             Yow!  I hope something GOOD
                                  at               came in the mail today so
                               visi.com            I have a REASON to live!!



More information about the Python-list mailing list