Tkinter: centering windows on screen

Kevin Cazabon kcazabon at home.com
Sun Apr 9 22:39:32 CEST 2000


Thanks Fred... It'll work, but that means that I'll actually have to do some
work to get it positioned right!  q:]

I guessed it wouldn't be as easy as widget.place(CENTER).  Oh well...

Is there a Python or Tkinter call to return the screen resolution?  I know I
can probably get it through Win32, but I'd rather make it cross-platform...
I'll do some digging.

Kevin.

"Fredrik Lundh" <effbot at telia.com> wrote in message
news:xR4I4.274$rc9.188784640 at newsb.telia.net...
> Kilian Lorenz <kilian.lorenz at dkfz-heidelberg.de> wrote:
> > >> that works but doesn't help me much because I'm interested in the
> > >> return value. So I would really like to know how to call Tk commands
> > >> from within Python because .... blah blah
> >
> > Now I also found out how this works ... pretty easy with
> > <widget>.tk.call(<command>, <parameter>, <next parameter> ...)
> >
> > You just have to browse Tkinter.py and get the answers to all your
> > questions !  :)
>
> if you browsed the source, how come you didn't find the
> corresponding Tkinter methods?
>
> windows geometry:
>
http://w1.132.telia.com/~u13208596/tkintrobook/x9867-window-geometry-methods
> .htm
>
> file dialogues:
> http://w1.132.telia.com/~u13208596/tkintrobook/x1164-data-entry.htm
>
> (direct pointers to the current draft; official version at
> www.pythonware.com will be synchronized next week).
>
> </F>
>
>





More information about the Python-list mailing list