How to Change Font Size in Tkinter Label 

Font Family : Allegro,Amazone BT,Arial, Arial Black,Arial Narrow, Bazooka,Calligrapher, Courier, Courier New,Geneva, Helvetica, Times New Roman,Calibri, Century,Vrinda, Verdana Others.


Font Size: 1-100 (As Your wish )
Style: bold, italic, bold italic, underline.


Syntax:  font=("font family", font Size,"Style" )


from tkinter import *

my_window = Tk()
my_window.title("Label Window")
my_window.config(bg="#B4EEB4")
my_window.geometry("850x400+450+86")

lbl1 = Label(my_window, text="I Am Label Window")
lbl2= Label(my_window, text="I Am Vridana Font Family, Font size 12 and Style bold",
font=("Vrinda", 12, "bold"))
lbl3= Label(my_window, text="I Am Bazooka Font Family, Font size 16 and Style italic",
font=("Bazooka", 16, "italic"))
lbl4= Label(my_window, text="I Am Times new Roman Font Family, Font size 19 and Style bold
italic", font=("Times New Roman", 19, "bold italic"))
lbl5= Label(my_window, text="I Am Times new Roman Font Family, Font size 21 and Style underline",
font=("Times New Roman", 21, "underline"))

lbl1.pack()
lbl2.pack(pady=10)
lbl3.pack(pady=10)
lbl4.pack(pady=10)
lbl5.pack(pady=10)

my_window.mainloop()

Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.






Post a Comment

Previous Post Next Post