Feb-01-2021, 03:06 PM
(Jan-27-2021, 11:31 AM)steve_shambles Wrote: I think he just wants to know how to disable a button when clicked.Tysm it worked!
from tkinter import * root = Tk() def my_fun(): #make the my_btn state disabled #do some thing else my_btn.config(state=DISABLED) my_btn = Button(root, text = "CLICK ME", command = my_fun) my_btn.pack()The line you used with .pack on the end won't work in this scenario
so I changed that.
To re-enable the button change DISABLED to NORMAL.