How to make a Tkinter window not resizable?

前端 未结 2 928
囚心锁ツ
囚心锁ツ 2021-02-01 13:52

I need a Python script that uses the Tkinter module to create a static (not resizable) window.

I have a pretty simple Tkinter script but I don\'t want it to be resizable

2条回答
  •  没有蜡笔的小新
    2021-02-01 14:18

    yups!!!, I have the solution, tkinter has resizable function which helps here. just use

    from tkinter import *
    gui = Tk()
    gui.title("Tkinter window")
    gui.geometry("370x250") 
    gui.resizable(False,False)
    gui.mainloop()
    

提交回复
热议问题