忽隐忽现的文字by李兴球

李兴球tkinter忽隐忽现的文字

李兴球tkinter忽隐忽现的文字

"""
   忽隐忽现的文字.py
"""
import time
from tkinter import *

root = Tk()
root.title('忽隐忽现的文字')

canvas = Canvas(root,width=480,height=360,bg='lime')
canvas.pack()

t = canvas.create_text(240,180,text='风火轮编程',angle=30,
            fill='blue',font=('楷体',32,'underline'))

while True:
    canvas.itemconfig(t,state=HIDDEN)
    canvas.update()
    time.sleep(0.5)    
    canvas.itemconfig(t,state=NORMAL)
    canvas.update()
    time.sleep(0.5)

    

关于李兴球

李兴球的博客是Python创意编程原创博客
此条目发表在python, tkinter分类目录,贴了, 标签。将固定链接加入收藏夹。

发表回复