Tkinter는 처음에 모든 응용 프로그램에 대해 크기 조정 가능한 창을 만듭니다. 응용 프로그램에서 크기를 조정할 수 없는 창을 만들고 싶다고 가정해 보겠습니다. 이 경우 크기 조정(높이, 너비) 을 사용할 수 있습니다. height=None 값을 전달합니다. 및 width=없음 . 이 방법은 또한 부울 값을 resizable(False, False)로 전달하여 작동합니다. .
예시
#Import the required libraries
from tkinter import *
#Create an instance of tkinter frame
win= Tk()
#Set the geometry of frame
win.geometry("600x250")
#Set the resizable property False
win.resizable(False, False)
#Create a label for the window or frame
Label(win, text="Hello World!", font=('Helvetica bold',20),
anchor="center").pack(pady=20)
win.mainloop() 출력
위의 코드를 실행하면 크기를 조정할 수 없는 창이 표시됩니다.
