tkinter 窗口放置到顶层

import tkinter as tk
window = tk.Tk()
window.wm_attributes('-topmost', 1)  # 锁定窗口置顶
window.wm_attributes('-topmost', 0)  # 释放窗口置顶
window.mainloop()

你可能感兴趣的:(tkinter 窗口放置到顶层)