On 17/06/18 23:59, Ali M wrote: > def update_list(self): > search_term = self.search_var.get() > self.listbox.delete(0, tk.END) > for item in self.listbox:
The above pair of lines look odd. You delete everything on the listbox then try to iterate over it? Is that really what you want? Also are you sure you can iterate over a listbox widget? I was not aware of that capability and can see nothing about iterators in the listbox help screen... I usually use the get() method to fetch the contents before trying to iterate over them: for item in myList.get(0,tk.END): # use item -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor