Search code examples
python-3.xtkintertkinter-button

Switching between Tkinter screens with withdraw() method on button click


Everything here works just fine but I haven't found a way to make it so that when I press the start button it withdraws the Main Menu screen and displays the next one. It already creates the second screen when I run the code and it withdraws the MainMenu Screen before I even click the start button.

https://replit.com/@AbdullahKaran/ConfusedSophisticatedFolders#main.py


Solution

  • Now, you can do this by using the tkraise() method of the Frame widget. To learn more, please visit this website: https://www.pythontutorial.net/tkinter/tkraise/