I\'m trying to make a button like a switch, so if I click the disable button it will disable the \"Button\" (that works). And if I press it again, it will enable it again.>
The problem is in your switch
function.
def switch():
b1["state"] = DISABLED
When you click the button, switch
is being called each time. For a toggle behaviour, you need to tell it to switch back to the NORMAL
state.
def switch():
if b1["state"] == NORMAL:
b1["state"] = DISABLED
else:
b1["state"] = NORMAL