Closed Mariuseledy closed 1 year ago
Nevermind I just had to do listbox.delete("all") and it works now.
@Mariuseledy
Thanks for this, in CtkListbox V0.4 I had been deleting all items in the listbox with this method
for d in range(self.leaching_schedules.size()): self.leaching_schedules.delete(d)
When updating to V0.8 it suddenly started having an index error. Using listbox.delete("all") fixed it.
@Mariuseledy @codedreamin I tried to fix this issue, please try the new version.
@Akascape
It seems to be fixed now. Thank you!
Hey, I'm trying to delete all the data inside my listbox every time I search and add the new data that matches some characters (basically a search box). When I'm trying to delete the data I keep getting this error:
File "C:\Users\Mariusel\Desktop\New folder (2)\main.py", line 142, in
update_listbox(people_list_from_db)
File "C:\Users\Mariusel\Desktop\New folder (2)\main.py", line 137, in update_listbox
listbox.delete(customtkinter.END, 0)
TypeError: CTkListbox.delete() takes 2 positional arguments but 3 were given
This is my code: def update_listbox(data):
Sort the data alphabetically by the "nume" field
The code was working before and it was the same except the customtkinter.END syntax. Can I get some help with that?