I am trying to make a button change when it is pressed but the configure
function when I use it returns the error:
A1.config(text="X", state="disabled", relief="SUNKEN")
AttributeError: 'NoneType' object has no attribute 'config'
I also tried using configure
instead of config
and the response is the same:
A1.configure(text="X", state="disabled", relief="SUNKEN")
AttributeError: 'NoneType' object has no attribute 'configure'
(for reference) the button:
A1 = Button(window,text="",width=5, height=1, command=click).place(x=100, y=100)
the command:
def click():
A1.configure(text="X", state="disabled", relief="SUNKEN")