How to set a tkinter window to a constant size

后端 未结 5 774
粉色の甜心
粉色の甜心 2020-12-13 05:01

I\'m programming a little game with tkinter and briefly, I\'m stuck.

I have a kind od starting menu, in which are two buttons and one label.

If I just create

5条回答
  •  北海茫月
    2020-12-13 05:36

    Here is the most simple way.

    import tkinter as tk
    
    root = tk.Tk()
    
    root.geometry('200x200')
    root.resizable(width=0, height=0)
    
    root.mainloop()
    

    I don't think there is anything to specify. It's pretty straight forward.

提交回复
热议问题