Python3 Tkinter fonts not working

前端 未结 2 1506
小鲜肉
小鲜肉 2021-01-12 20:42

I am using python 3.3 with tkinter, and the package python3-tk is installed. In most docs the old \"import tkFont\" is used, which is not working any more.

This is s

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-12 21:01

    from tkinter import *
    from time import sleep
    
    window = Tk()
    window.geometry("350x400")
    window.title("tkinter!")
    
    lbl = Label(window, text="this is a lable", size=12)
    lbl.pack()
    
    sleep(1)
    
    lbl.configure(text="now it is a big lable", size=48)
    

提交回复
热议问题