I was wondering how to put a button inside of a canvas using the tkinter module. This question was asked, but it was 5 years ago and for a different version so It was not very convenient for my situation and I am still a beginner so I only understood about 3/4 of the code in the best answer. Here is the question: How to make a Button using the tkinter Canvas widget?
from tkinter import *
root = Tk()
c=Canvas(root,width=200,height=150,bg='blue')
c.pack(side = 'top')
c.create_text(100,50,anchor='c',fill='orange',font='Times 28',text='List')
button = Button(root, text="Quit",command=root.destroy)
button.pack()
mainloop()
When I run this code it creates the button below my Canvas and not on the Canvas. I looked for help on https://docs.python.org/3.7/library/tkinter.html the guide for the IDE I am using. I could not find a way to put the button on the Canvas even though I may or may not have missed something. If this question is seen as not helpful or unnecessary I apologize and will close it immediately.
Version of Python: 3.7
Level: Beginner
Running Code on: IDLE 64-bit
OS: Windows 10