gibt es eine Möglichkeit, ein mit destroy zerstörtes widged wieder zu errichten?
Bsp.
Code: Alles auswählen
import Tkinter as tk
root = tk.Tk()
frame = tk.Frame(root,width = 20, height = 6)
frame.pack()
but1 = tk.Button(frame, text = 'but1', width = 20, height = 3)
but1.pack()
def zerstoere_but1():
but1.destroy()
but2 = tk.Button(frame, command = zerstoere_but1, text= 'del but1', width = 20, height = 3)
but2.pack()
def build_but1():
pass
but3 = tk.Button(frame, command = build_but1, text= 'build_but1', width = 20, height = 3)
but3.pack()
root.mainloop
py-mule