import tkinter as tk mywindow = tk.Tk() mywindow.title("xian shi wen ben") mycanvas = tk.Canvas(mywindow,width=600,height=260,bg="black") mycanvas.pack() global colors colors = ["blue","red","yellow","orange","green","purple","red","yellow","green","blue","orange"] for i in range(1,90,5) : mytxt = mycanvas.create_text(220+i,80+i,text = "minecraft",fill=colors[i//11],font="Arial %d bold" %i) #这里的minecraft可以自行更改
中级程序员
by: mikeKil 发表于:2022-04-09 15:02:24 顶(0) | 踩(0) 回复
是不是少了mainloop?
回复评论