Python Forum
[Tkinter] Clearing listboxes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Clearing listboxes
#4
You can use winfo_children() if you want to clear all the list boxes. This does entry widgets too.
for child in frame.winfo_children():
    if isinstance(child, (tk.Entry, tk.Listbox):
        child.delete(0, tk.END)
Reply


Messages In This Thread
Clearing listboxes - by klatlap - Feb-01-2022, 09:36 AM
RE: Clearing listboxes - by menator01 - Feb-01-2022, 10:44 AM
RE: Clearing listboxes - by klatlap - Feb-01-2022, 01:28 PM
RE: Clearing listboxes - by deanhystad - Feb-01-2022, 04:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QLabel is not clearing before updating carlrostron 8 1,295 Jan-07-2025, 09:16 AM
Last Post: carlrostron
  [Tkinter] Clearing Text in Tkinter icabero0225 2 27,237 May-31-2017, 09:38 PM
Last Post: icabero0225

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020