GUI 프로그램을 만들 때마다 tkinter는 일반적으로 백그라운드에서 출력 화면을 표시합니다. 즉, tkinter는 다른 프로그램 뒤에 프로그램 창을 표시합니다. tkinter 창을 다른 창 위에 표시하려면 attributes('-topmost',True)를 사용해야 합니다. 특성. 창을 위쪽으로 끌어 올립니다.
예시
#Importing the library
from tkinter import *
#Create an instance of tkinter window or frame
win= Tk()
#Setting the geometry of window
win.geometry("600x350")
#Create a Label
Label(win, text= "Hello World! ",font=('Helvetica bold', 15)).pack(pady=20)
#Make the window jump above all
win.attributes('-topmost',True)
win.mainloop() 출력
위의 코드를 실행하면 창이 다른 모든 창 위에 유지됩니다 -
