To change the text of an existing Tkinter label, call label.config(text="Updated text"). You can also write label.configure(text="Updated text"); config() is an alias of configure(). For text that should follow changing application state, connect the label to a StringVar and update that variable with set().
Change an existing label directly
A Label displays text, a bitmap, or an image, and its text can be changed after the widget has been created. Python’s Tkinter documentation describes config() as an alias of configure(); either method accepts the text option.
label.config(text="Updated text")
# Equivalent:
label.configure(text="Updated text")
Use this approach when code explicitly decides when to replace the label’s text, such as after a button click or a completed operation.
Keep a label in sync with changing state
If a displayed value changes over time, bind a Tkinter StringVar to the label with textvariable. Updating the Tk variable then updates the linked label.
#1 Best Overall
import tkinter as tk
root = tk.Tk()
message = tk.StringVar(value="Ready")
label = tk.Label(root, textvariable=message)
label.pack()
message.set("Processing complete")
root.mainloop()
Use a Tkinter variable such as StringVar for this connection. Reassigning an ordinary Python string does not notify the widget:
message = "Processing complete" # Does not update a label by itself
Instead, retain the Tk variable and call its set() method, as in the example above. The Tkinter documentation covers Tkinter’s variable classes and widget options.
Use the same options with ttk.Label
Themed labels created with ttk.Label support both text and textvariable. Set the text directly when configuring the widget, or bind a Tkinter variable when the displayed value should track application state.
from tkinter import ttk
ttk_label = ttk.Label(root, text="Ready")
ttk_label.config(text="Updated text")
For a variable-driven ttk label, pass a Tkinter variable as textvariable in the same way as with tk.Label.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchQuick Recap
Best Value
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




