Search code examples
pythontkinterlabel

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 ?


Solution

  • 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')