Tkinter는 애플리케이션 창을 기본 크기로 표시합니다. 그러나 attributes('fullscreen', True)를 사용하여 전체 화면 창을 표시할 수 있습니다. 방법. 이 방법은 일반적으로 transparentcolor와 같은 속성이 있는 tkinter 창을 할당하는 데 사용됩니다. , 알파, 비활성화됨, 전체 화면, 도구 창 , 및 최상위 .
예시
#Import the tkinter library
from tkinter import *
#Create an instance of tkinter frame
win = Tk()
#Set the geometry
win.geometry("650x250")
#Add a text label and add the font property to it
label= Label(win, text= "Hello World!", font=('Times New Roman bold',20))
label.pack(padx=10, pady=10)
#Create a fullscreen window
win.attributes('-fullscreen', True)
win.mainloop() 출력
위의 코드를 실행하면 Alt+ F4 키를 눌러 닫을 수 있는 전체 화면 창이 표시됩니다.
