zzz123 zzz123 - 3 years ago 172
Python Question

Make a Label Bold Tkinter

How do I make a Label in Tkinter Bold ?

This is my code

labelPryProt=Label(frame1,text="TEXTTEXT")
labelPryProt.pack(side=LEFT,fill=BOTH,expand=False)
labelPryProt.configure(font=("Helvetica",BOLD, 18))#this is not working not making the text as bold


What is the error ?

Answer Source

You don't have to configure it separately, you can pass an argument when you are creating the widget:

labelPryProt = Label(frame1, text='TEXTTEXT', font='Helvetica 18 bold')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download