I am trying to bold all of the entries for my python tkinter listbox.
I have a list and it enters it into a listbox:
listbox4.insert(END, Words)
Does anyone know the code to bold these entries?
you can configure the Font used by the listbox object for all of the text
assuming you are using python 3 and tkinter the code would be like follows (replace the import line with import tkFont on python 2)
from tkinter import font
listbox4.insert(END, Words)
bolded = font.Font(weight='bold') # will use the default font
listbox4.config(font=bolded)
see here for some more tkFont documentation in case you want to change the font-family, size, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With