Experimenting with Tkinter and Gui creating and cant seem to run two commands off of one button press.
I've already tried moving the second definition out of the first definition to the same error as before. The problem is that it is a separate window to my main window and so is under a different definition meaning. When I've tried the previous threads answers it isn't working for me.
def cheese():
fll = Tk()
#The two commands linked together
def fildes():
filling2()
fll.destroy
fll.title=("Test")
ll = Label(fll, text ="Would you like to choose another topping?").pack()
#The button under this runs fildes()
bb = Button(fll, text ="Yep", command = fildes).pack()
bbb = Button(fll, text ="No", command = fll.destroy).pack()
It should create a window and when the yes button is pressed open a new window while closing the current window.
It opens the new window but fails too delete the current window due to fll not being defined
def fildes():
filling2()
fll.destroy()
this does not work either