📜  python tkinter中的按钮onclick消息框 - Python代码示例

📅  最后修改于: 2022-03-11 14:45:46.457000             🧑  作者: Mango

代码示例1
import tkinter.messagebox
def onClick():
    tkinter.messagebox.showinfo("Title goes here","Message goes here")
root = tkinter.Tk()
button = tkinter.Button(root,text = "Click Me", command = onClick)
button.pack()
root.mainloop()