# tk常见的消息框
from tkinter.commondialog import Dialog
#图标
ERROR = "error"
INFO = "info"
QUESTION = "question"
WARNING = "warning"
ABORTRETRYIGNORE = "abortretryignore"
OK = "ok"
OKCANCEL = "okcancel"
RETRYCANCEL = "retrycancel"
YESNO = "yesno"
YESNOCANCEL = "yesnocancel"
ABORT = "abort"
RETRY = "retry"
IGNORE = "ignore"
OK = "ok"
CANCEL = "cancel"
YES = "yes"
NO = "no"
#消息对话框类
class Message(Dialog):
"A message box"
command = "tk_messageBox"
def _show(title=None, message=None, _icon=None, _type=None, **options):
if _icon and "icon" not in options: options["icon"] = _icon
if
1.2 【python】tkinter一个有趣的小项目
最新推荐文章于 2024-10-06 14:15:29 发布
本文介绍如何利用Python的tkinter库制作一个有趣的小应用程序,通过实例展示tkinter的基本用法,适合初学者入门实践。
摘要由CSDN通过智能技术生成