Overwriting over label widget.

Example:

from tkinter import *

my_window = Tk()
my_window.title("This is example")
my_window.geometry("800x350+450+86")
my_window.config(bg="#7CFC00")

stable_text = "Textvarialble is Update Using Button Click"

def update():
        global stable_text
       lbl.config(text=stable_text)

btn = Button(my_window,text="Please Update", command=update, height=2,                  
                    width=15,bg="#FFB6C1", font=("Times", 20, "bold"))
lbl = Label(my_window,text="If You Click Button then i am Updated"
                   font=("times",20, "bold"))

lbl.pack(pady=20)
btn.pack(pady=10)

my_window.mainloop()


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


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

Post a Comment

Previous Post Next Post