Python tkinter single label with bold and normal text Python tkinter single label with bold and normal text tkinter tkinter

Python tkinter single label with bold and normal text


No, you cannot change the attributes of only some of the characters in a Label widget. If you need to style individual character you need to use a small Text widget.

For example:

text = tk.Text(root, height=1, font="Helvetica 12")text.tag_configure("bold", font="Helvetica 12 bold")text.insert("end", "Hello, ") text.insert("end", "world", "bold") text.configure(state="disabled")