Python Tkinter() how to remove the frame on the main window? - second question, simpler code

Viewed 31

I have a question how to delete a frame, I want to delete this frame where there is "tk#number", "x", min? (simple example) Thank you for your help :D

import tkinter as tk

root = tk.Tk()

root.counter = 0


def clicked():
    root.counter += 1
    label['text'] = 'Button clicked: ' + str(root.counter)


tk.Button(root, text="Click Me", command=clicked).pack()

label = tk.Label(root, text="No clicks yet.")
label.pack()

root.mainloop()
0 Answers
Related