How to define a window's position (Tkinter)

Russell E. Owen no at spam.invalid
Mon Feb 28 17:53:43 EST 2005


In article <1109516700.351898.72850 at l41g2000cwc.googlegroups.com>,
 "Harlin Seritt" <harlinseritt at yahoo.com> wrote:

>I am trying to use the geometry() method with the toplevel window
>called root. I know that one can do the following:
>
>root.geometry('400x400+200+200')
>
>This will put the window in 200, 200 position with a size of 400x400.
>Now, I don't really want to set the size. I simply want to set the
>position of the window. I've tried this:
>
>root.geometry('200+200')
>
>However, this doesn't seem to work. What can I do to set the position
>of the window without actually setting the size?

You were almost there, but you need an initial "+":
root.geometry("+200+200").

-- Russell



More information about the Python-list mailing list