add font to the label in window tkinter

Solutions on MaxInterview for add font to the label in window tkinter by the best coders in the world

showing results for - "add font to the label in window tkinter"
Clarisse
13 Sep 2020
1import tkinter
2
3window = tkinter.Tk()       # creating the window object
4window.title('my first GUI program')
5window.minsize(width=600, height=500)
6
7# label 
8# adding text to the middle of the window
9my_label = tkinter.Label(text='I am a Label', font=('Cursive', 24, 'bold'))
10my_label.pack()
11
12window.mainloop()           # keeping the window until we close it