python 自带的 tkinter 库 是这样实现的

#!/usr/bin/python
# -*- coding: UTF-8 -*-

from Tkinter import *
 
from tkMessageBox import *
 
def answer():
 
    showerror("Answer", "Sorry, no answer available")
    
def callback():
 
     askyesno('Verify', 'Really quit?')
 
 
Button(text='YE', command=callback).pack(fill=X)
 
Button(text='NO', command=answer).pack(fill=X)
 
mainloop()

相关文章:

  • 2021-10-10
  • 2022-12-23
  • 2021-05-15
  • 2021-12-28
  • 2021-08-11
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-07
  • 2022-01-01
  • 2021-08-18
  • 2022-12-23
  • 2021-08-09
相关资源
相似解决方案