Python - Text input within a Tkinter canvas Python - Text input within a Tkinter canvas tkinter tkinter

Python - Text input within a Tkinter canvas


You can use create_window to place a widget within a canvas.

e1 = Entry(canvas)canvas.create_window(400,10,window=e1)


Ok I did some more reading up on what a tuple actually is and I was able to fix the error.

Just had to remove the x= and y= so that the coordinates of the window are by themselves.


Uncomment your e1 and e2. You have to use the .pack() feature.

e1.pack()e2.pack()

This should get it to go on the screen, the rest is up to you!

EDIT: Also, shouldn't it be canvas.mainloop()? Is window defined or is canvas?