Tkinter window location

Richard Chamberlain richard_chamberlain at ntlworld.com
Thu Aug 24 17:32:41 EDT 2000


Hi Mike,

You can use the geometry method:

root=Tk()
root.geometry('100x100+20+20')

This makes root 100 pixels high and wide and positions it at 20,20
pixels on the screen.

Richard

Mike Olson wrote:
> 
> Is there a way to set a Tkinter window (Tk or Toplevel) to be at a
> certain place in the screen, for example, the upper left or the center
> of something, instead of going a little bit down and right each time you
> open it?
> 
> --
> Mike Olson
> Provis Corporation
> Columbia Heights, MN
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.



More information about the Python-list mailing list