我是靠谱客的博主 痴情心锁,这篇文章主要介绍python对话框,并选择yes/no,现在分享给大家,希望可以做个参考。

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()

转载于:https://www.cnblogs.com/yingfei/p/7291690.html

最后

以上就是痴情心锁最近收集整理的关于python对话框,并选择yes/no的全部内容,更多相关python对话框内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(41)

评论列表共有 0 条评论

立即
投稿
返回
顶部