Python “坏选择”-选项";:必须为-default、-detail、-icon、-message、-parent、-title或-type
我想在此showinfo消息框中插入选项Python “坏选择”-选项";:必须为-default、-detail、-icon、-message、-parent、-title或-type,python,tkinter,options,messagebox,Python,Tkinter,Options,Messagebox,我想在此showinfo消息框中插入选项 from tkinter import * from tkinter import messagebox root =Tk() root.title("Messaging box") def popup(): messagebox.showinfo("Title","Hello World!",options = ['got it!,no']) Button(root,text = &
from tkinter import *
from tkinter import messagebox
root =Tk()
root.title("Messaging box")
def popup():
messagebox.showinfo("Title","Hello World!",options = ['got it!,no'])
Button(root,text = "Popup",command = popup).pack()
root.mainloop()
请有人清楚地回答
消息框。showinfo
没有该选项,所以不要使用它。我认为messagebox
不可能实现您想要的功能,您必须使用Tk
或Toplevel