Button state in tkinter 


If it is set to DISABLED to make the button unresponsive. 
ACTIVE represents the active state of the button.


******Your code Below*****

from tkinter import *

root= Tk()
root.title("Button State")
root.config(background="#FFF8DC")
root.geometry("900x500+350+86")

btn1= Button(root, text="Normal Button ",font=("Times", 20, "bold"),padx=20, pady=10,bd=10)
btn2= Button(root, text="Disable Button",font=("Times", 20, "bold"),padx=20, pady=7,state="disable")
btn3= Button(root, text="Enable Button",font=("Times", 20, "bold"),padx=20, pady=7)
btn4= Button(root, text="Disable Button",font=("Times", 20, "bold"),padx=20, pady=7,state="disable")

btn1.pack(pady=5)
btn2.pack(pady=5)
btn3.pack(pady=5)
btn4.pack(pady=5)

root.mainloop()

********End Code**********


Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.


Enjoy..............


If You Want To Learn More Plz Visit www.newpost24.com

If You Find Specific link plz Follow This Page.


Post a Comment

Previous Post Next Post