I would like to create pop up messages like this in Tkinter. Is there a way to do it?
I do not want a message pop up that requires the user to press a button or to react to disappear or messagebox module or a Toplevel object.
Thanks in advance.
>Solution :
If the popup is fully within the window, you can simply place a Label where you want the popup to show up and schedule a call to destroy it after some delay:
import tkinter as tk
root = tk.Tk()
def show_popup():
label = tk.Label(root, text="This is a popup message!", bg="black", fg="white", wraplength=100)
label.place(relx=0.5, rely=0.5, anchor="center")
root.after(2000, label.destroy)
tk.Label(root, text="Some text here.").pack(padx=10, pady=10)
tk.Button(root, text="Show popup", command=show_popup).pack(padx=10, pady=10)
root.mainloop()