Python tkinter.messagebox 模块,askretrycancel() 实例源码

我们从Python开源项目中,提取了以下7个代码示例,用于说明如何使用tkinter.messagebox.askretrycancel()

项目:Mac-Python-3.X    作者:L1nwatch    | 项目源码 | 文件源码
def main():
    # ?????????,?????Tkinter????????Tk??.??????withdraw()??????
    tk = tkinter.Tk()
    tk.withdraw()  # ?????

    print(dir(mb))

    # ??,?????????,??ok,????????????.??????????????,??????????.
    # ??,???Cancel?,??????None
    mb.showinfo("Title", "Your message here")
    mb.showerror("An Error", "Oops!")
    mb.showwarning("Title", "This may not work...")
    mb.askyesno("Title", "Do you love me?")
    mb.askokcancel("Title", "Are you well?")
    mb.askquestion("Title", "How are you?")
    mb.askretrycancel("Title", "Go again?")
    mb.askyesnocancel("Title", "Are you well?")
项目:SceneDensity    作者:ImOmid    | 项目源码 | 文件源码
def retryBox(self, title, message):
        self.topLevel.update_idletasks()
        return MessageBox.askretrycancel(title, message)
项目:sc8pr    作者:dmaccarthy    | 项目源码 | 文件源码
def __init__(self, response=str, text="", title=None, accept=0, **options):
        if response is bool:
            self.dialog = [askyesno, askokcancel, askretrycancel][accept]
        else: self.dialog = {None:showinfo, str:askstring, int:askinteger, float:askfloat,
            0:askopenfilename, 1:asksaveasfilename, 2:askdirectory}[response]
        self.options = options.copy()
        if "initialdir" in options:
            self.options["initialdir"] = abspath(options["initialdir"])
        if type(response) is int:
            self.args = tuple()
            if title: self.options["title"] = title
        else:
            if title is None:
                title = "Info" if response is None else "Confirm" if response is bool else "Input"
            self.args = title, text
项目:Cryptokey_Generator    作者:8BitCookie    | 项目源码 | 文件源码
def retryBox(self, title, message):
        self.topLevel.update_idletasks()
        return MessageBox.askretrycancel(title, message)
项目:SPGL    作者:wynand1004    | 项目源码 | 文件源码
def ask_retry_cancel(self, title, message):
        return messagebox.askretrycancel(title, message)
项目:SPGL    作者:wynand1004    | 项目源码 | 文件源码
def ask_retry_cancel(self, title, message):
        return messagebox.askretrycancel(title, message)
项目:BeachedWhale    作者:southpaw5271    | 项目源码 | 文件源码
def retryBox(self, title, message):
        self.topLevel.update_idletasks()
        return MessageBox.askretrycancel(title, message)