Compare commits
2 Commits
87d584ed46
...
189af11f07
Author | SHA1 | Date |
---|---|---|
|
189af11f07 | |
|
43ea4a3b00 |
|
@ -9,13 +9,12 @@ class MovingLabel(threading.Thread):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
self.text=text
|
self.text=text
|
||||||
self.label=tk.Label(window,image=kuang,text=self.text,compound="center",font=("黑体",20),fg="white",width=190,height=45)
|
self.label=tk.Label(window,image=kuang,text=self.text,compound="center",font=("黑体",20),fg="white",width=190,height=45)
|
||||||
self.label.place(x=800,y=random.randint(10,550))
|
self.label.place(x=random.randint(50,800),y=0)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
x=800
|
y=0
|
||||||
while x>-200:
|
while y<650:
|
||||||
x-=2
|
y+=2
|
||||||
self.label.place(x=x)
|
self.label.place(y=y)
|
||||||
time.sleep(0.02)
|
time.sleep(0.02)
|
||||||
self.label.destroy()
|
self.label.destroy()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue