Witam i ponownie proszę o pomoc!. Mój problem to: jak wyczyścić okno po naciśnięciu przycisku zapisz. Próbowałem sposobami pokazanymi w internecie i nic. Próbowałem w def Usun poleceń delete, destroy i nic, co robię źle i jak z tym sobie poradzić? Proszę o pomoc.
import tkinter as tk
from time import strftime
class NewUser():
def __init__(self):
self.root = tk.Tk()
self.root.geometry("800x600")
self.root.title("jakis napis")
linia1=tk.Label(self.root, text="jkfggfkfkfljf").pack()
linia2=tk.Label(self.root, text="jkfggfkfkfljf").pack()
linia3=tk.Label(self.root, text="jkfggfkfkfljf").pack()
linia4=tk.Label(self.root, text="jkfggfkfkfljf").pack()
przycisk = tk.Button(self.root, text="zapisz",command=self.Usun).pack()
self.root.mainloop()
def Usun(self):
# jak wyczyścić okno?
return
main = NewUser()