messagebox 弹窗
需求:
import tkinter as tk
import tkinter.messagebox
window = tk.Tk()
window.title('my window')
window.geometry('200x200')
def hit_me():
#tk.messagebox.showinfo(title = 'Hi',message='hahaahha')
tk.messagebox.showwarning(title='Hi', message='nononono')
#tk.messagebox.showerror(title='Hi', message='no!never')
#print(tk.messagebox.askquestion(title='Hi', message='hahaahha')) # return yes or no
#print(tk.messagebox.askyesno(title='Hi', message='hahaahha')) #return true or false
b = tk.Button(window,text='hit me',command=hit_me).pack()
window.mainloop()