buaa21 / summer2020

软件学院《程序设计实践》2020小学期仓库
40 stars 8 forks source link

pygame想显示一个提示信息,但0.5s后要让它消失,这该怎么做? #220

Closed buaadzr closed 3 years ago

buaadzr commented 3 years ago
PineZhuo commented 3 years ago
import tkinter as tk

root = tk.Tk()
root.title("info")

tk.Label(root, text="This is a pop-up message").pack()

root.after(500, lambda: root.destroy())     # time in ms

root.mainloop()