It's all in the title. If I have this how can I reset my menu? (Thank you in advance for your help)
menu = tk.Menu(root, tearoff = False)
menu.add_command(label="Open", command=Open)
menu.add_command(label="Close", command=Close)
menu.delete_all_commands() #magic function
You can simply use the .delete() method, which takes two arguments: index1 (where to start deleting) and index2 (where to stop deleting) and then use the common 0, "end" heuristic to work this out. So:
menu.delete(0, "end")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With