📜  如何在 Python 代码示例中处理来自 tkinter messagebox.askquestion() 函数的响应

📅  最后修改于: 2022-03-11 14:45:31.121000             🧑  作者: Mango

代码示例1
def new_game_confirm(self):
        result = messagebox.askquestion("Start a new game", "Are you sure you want to start a new game ? Your current campaign will be overriden and there is no going back !", icon='warning')
        if result == 'yes':
            self.proceed_to_new_game_menu()
        else:
            pass