对话框的一个例子:

from tkinter.dialog import *
from tkinter import *
def investigation():
    d=Dialog(None,title='快乐指数',text='2018年的您觉得过的快乐吗?',
    bitmap=DIALOG_ICON,default=0,strings=('不快乐','还可以','很快乐','非常快乐'))
    print(d.num)
t=Button(None,text='幸福度调查',command=investigation)
t.pack()
b=Button(None,text='关闭',command=t.quit)
b.pack()
t.mainloop()
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-10-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
  • 2021-10-12
  • 2021-08-08
相关资源
相似解决方案