I have created the following button in a tinter window:
resetall = Button(text = "Clear ALL", command = confirmation)
resetall.pack(side = "left")
This button "Clears" the canvas that the user is drawing on with the Python turtle, but I want this button to be enabled under CERTAIN CONDITIONS, such as if one function is running or not. I have tried this:
if draw.drawing == False:
resetall.config(state = DISABLED)
elif draw.drawing == True:
resetall.config(state = NORMAL)
to enable the button ONLY when the "draw" function is true, otherwise disable it. However, it does not seem to work, as even when the draw function becomes true, it does not get enabled. What am I doing wrong here? Any help is much appreciated! :)
stateany time you changedraw.drawing