Skip to content
Advertisement

How to make button using canvas in toplevel() Tkinter

I’m trying to make a button using canvas.create_window in toplevel() in Tkinter. Button is used to go back to main window. First “Start” button is displayed but second “Back” button is not. Code below.

JavaScript

Advertisement

Answer

The problem is the ordering of creation of canvas_two and button_back. You need to create the Canvas first and then put the Button on top of it as shown below.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement