Как заставить метку исчезнуть через 5 секунд Python, Tkinter?Python

Программы на Python
Ответить
Anonymous
 Как заставить метку исчезнуть через 5 секунд Python, Tkinter?

Сообщение Anonymous »

Я бросаю игральные кости и хочу, чтобы результат броска костей исчезал через 5 секунд. Кто-нибудь может помочь?
from tkinter import *
import random
root=Tk()
root.geometry('700x500')
root.title("Dice roller")
bg = PhotoImage(file = "background.png")
Label1 = Label(root, image = bg)
Label1.place (x = 0, y=0)
l = Label(root, text="Welcome to the dice roller, select the dice you want to roll!",bg = "gold",fg = "goldenrod4", relief = "raised", font=("Arial Bold",12))
l.pack()

def buttonFunction1():
r1 = random.randint(1, 6)
L = Label(root, text= r1, bg = "red", relief = "solid", cursor = "target", font = ("Arial Bold", 10))
###That was the label I want to make disappear after 5 seconds###
L.place(relx = 0.8, rely = 0.14, anchor = 'sw')
b = Button(root, text="cube dice", command= buttonFunction1)
b.pack()


Подробнее здесь: https://stackoverflow.com/questions/712 ... on-tkinter
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Python»