How to specify where a Tkinter window opens?

后端 未结 5 1694
抹茶落季
抹茶落季 2020-12-02 12:54

How can I tell a Tkinter window where to open, based on screen dimensions? I would like it to open in the middle.

5条回答
  •  执笔经年
    2020-12-02 13:34

    root.geometry('250x150+0+0')
    

    The first two parameters are the width and height of the window. The last two parameters are x and y screen coordinates. You can specify the required x and y coordinates

提交回复
热议问题