I'm a new programmer who am relatively new at using classes and Tkinter. I've had a problem where my Tkinter window won't pop up nor would it show any errors.
import Tkinter
from Tkinter import Canvas, Button
root = Tkinter.Tk()
canvas = Canvas(root, width=360, height=360, bg="white")
canvas.grid()
color = canvas.create_oval(100, 100, 160, 160, fill = "white")
def changeColor(x):
canvas.delete(color)
c = canvas.create_oval(100, 100, 160, 160)
canvas.itemconfigure(c,fill = x)
pink = Button(root, text = "This is just a button",changeColor("pink"))
pink.pack()
brown = Button(root, text = "This is brown",changeColor("brown"))
brown.pack()
root.mainloop()
I wanted to make a program where the color of the oval in the canvas changes according to the button. Any advices on how to fix this are greatly appreciated!