Everytime i run it, it works, but when I hover over the button, it gives me the error (TypeError: donehovering() takes 0 positional arguments but 1 was given)
Am I missing something completely obvious?
from tkinter import *
root = Tk()
root["bg"] = "black"
def colorchangeondemand():
if button.cget('bg') == "black":
button.config(bg="red", text="Started the program, please exit this window")
Toplevel(root)
def hoverover():
statusbar.config(text="Click to start the program already")
def donehovering():
statusbar.config(text="")
frame = Frame(root, width=1000, height=1000)
frame.grid(row=100, column=25)
statusbar = Label(frame, text="", bd=1, relief=SUNKEN, anchor=W)
statusbar.pack(side=BOTTOM, fill=X)
photo = PhotoImage(file="smaller.png")
put_the_photo_in = Label(frame, image=photo, bg="black")
label1 = Label(root, image=photo, fg="green", bg="black")
label1.grid(row=50,column=25)
label2 = Label(root, text="MadLibs in a GUI", fg="green", bg="black", font=159)
label2.grid(row=1,column=25)
button = Button(frame, text="Start", bg="black", fg="green", command=colorchangeondemand, pady=20, padx=75)
button.pack()
button.bind("<Enter>", hoverover)
button.bind("<Leave>", donehovering)
root.mainloop()