maliang.standard.dialogs¶
字数 9 个 阅读时间不到 1 分钟 访问量
源代码:maliang/standard/dialogs.py
All standard dialog classes
类:
-
TkMessage
–Message pop-up
-
TkColorChooser
–Color chooser pop-up
-
TkFontChooser
–Font chooser pop-up
TkMessage ¶
TkMessage(
message: str | None = None,
detail: str | None = None,
*,
title: str | None = None,
icon: typing.Literal["error", "info", "question", "warning"] = "info",
option: typing.Literal[
"abortretryignore", "ok", "okcancel", "retrycancel", "yesno", "yesnocancel"
] = "ok",
default: typing.Literal["abort", "retry", "ignore", "ok", "cancel", "yes", "no"] | None = None,
master: tkinter.Tk | None = None,
command: (
collections.abc.Callable[
[typing.Literal["abort", "retry", "ignore", "ok", "cancel", "yes", "no"]], typing.Any
]
| None
) = None
)
Message pop-up
message
: messagedetail
: detail messagetitle
: title of the windowicon
: iconoption
: type of the message pop-updefault
: button where the focus is, default is the leftmost onemaster
: parent widget of the windowcommand
: callback function
TkColorChooser ¶
TkColorChooser(
*,
title: str | None = None,
color: str | None = None,
master: tkinter.Tk | None = None,
command: collections.abc.Callable[[str], typing.Any] | None = None
)
Color chooser pop-up
title
: title of the windowcolor
: default colormaster
: parent widget of the windowcommand
: callback function
TkFontChooser ¶
TkFontChooser(
*,
title: str | None = None,
font: str | None = None,
master: tkinter.Tk | None = None,
command: collections.abc.Callable[[str], typing.Any] | None = None
)
Font chooser pop-up
title
: title of the windowfont
: default fontmaster
: parent widget of the windowcommand
: callback function