Label font : Font « 2D « Python






Label font

Label font
from Tkinter import *
root = Tk()
labelfont = ('times', 20, 'bold')                  # family, size, style
widget = Label(root, text='Hello config world')
widget.config(font=labelfont)                  
widget.pack(expand=YES, fill=BOTH)
root.mainloop()



           
       








Related examples in the same category

1.Checkbuttons demonstration: set fontCheckbuttons demonstration: set font
2.Checkbutton to set font to boldCheckbutton to set font to bold
3.Radiobuttons demonstration set Font in TextRadiobuttons demonstration set Font in Text
4.Set Button style: fontSet Button style: font
5.Set font from Root componentSet font from Root component
6.Button font: underline italicButton font: underline italic