Tkinter

How to Change the Font Size in a Label in Tkinter Python

In this tutorial, we are going to see how to change the font size in a label in Tkinter Python. Label is a standard Tkinter widget used to display a text or image on the screen. Label can only display text in one font. The text displayed by this widget can be updated at any time.
 

 

How to Change the Font Size in a Label in Tkinter Python
from tkinter import *

gui = Tk()

label = Label(gui, text="Welcome to StackHowTo!", font=("Courier", 30))
label.pack()

gui.mainloop()

Output:


 
If you want to change it later, you can use:

label.config(font=("Courier", 30))
mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *