If You Can Use textvariable to To Update label Text.

Example:

from tkinter import *


my_window = Tk()
my_window.title("Use of textvarialble")
my_window.geometry("800x350+450+86")
my_window.config(bg="#BFEFFF")

var_1=StringVar()

lbl1 = Label(my_window, font=("helvetica", 20,"bold"), bg="#EEE685",fg="red",
                    borderwidth=20, textvariable=var_1)
lbl1.pack(pady=40)

var_1.set("I Am New Set Using String Variable")

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