Akascape / CTkListbox

A simple listbox for customtkinter (extenstion/add-on)
MIT License
153 stars 13 forks source link

tipp: in case you get the error (TypeError: 'float' object cannot be interpreted as an integer) when trying to delete the list objects #23

Closed marlon-888 closed 9 months ago

marlon-888 commented 11 months ago

If there were too many file names/objects listed in the list box and I tried to delete the entire contents of the list using the command ".delete(1.0, tk.END)", I received the following error message:

for i in range(index, int(last)+1):
TypeError: 'float' object cannot be interpreted as an integer

and nothing was deleted.

If you have the problem, use the command:

".delete(0, self.file_listbox.size() - 1)"

or:

".delete("all")"

Akascape commented 9 months ago

@marlon-888 Fixed