📜  将字体添加到窗口 tkinter 中的标签 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:11.874000             🧑  作者: Mango

代码示例1
import tkinter

window = tkinter.Tk()       # creating the window object
window.title('my first GUI program')
window.minsize(width=600, height=500)

# label 
# adding text to the middle of the window
my_label = tkinter.Label(text='I am a Label', font=('Cursive', 24, 'bold'))
my_label.pack()

window.mainloop()           # keeping the window until we close it