Center new windows

Abel Daniel abli at freemail.hu
Tue Mar 25 17:11:44 EST 2003


richard.a.charts.1 wrote:
> Hi,
> I have a fairly quick question that I haven't been able find the answer
> for.  When opening a new window, how can I force it to open in the center
> of the screen?
> 
> I have searched through old messages but most are over 2 years old and I
> am wondering if there has been changes for the better?
If you mean the ones returned by google groups when searching for
-tkinter center screen- then I guess there isn't anything easier. (at
least i didn't hear of one, not that this means anything :) )

> On a small side note:
> How does geometry work with a given widget?  Whenever I try to use it,
> Python says that some class has no instance of geometry or withdraw or
> others for that matter.
To me it looked like only instances of Toplevel have the methods you
mention. Those methods deal with displaying windows, so they don't
really make sense for a Listbox widget, for example.

Abel Daniel





More information about the Python-list mailing list