I currently have this code:
import easygui, random, time, math, sys
from Tkinter import *
root=Tk()
root.geometry('800x800')
c=Canvas(root, width=800, height=800)
c.pack()
done=False
x=1
while not done:
#do something
root.update()
x=x+1
if x>=5:
c.destroy()
else:
done=False
y=easygui.buttonbox("The program should continue",
choices=['Yes','No'])
I would like the program to continue after the 'if x>5:' branch, onto the easygui portion of my code. I looked this question up, and found c.destroy. Unfortunately, it ends my code entirely, so the easygui button box doesn't even appear. Does anybody know how to delete the Tkinter canvas, and go on with the program. Would using ttk instead of easygui solve my problem? Or is there a simple fix in continuing my code with the same method I'm using?