self.custom_combobox = AutocompleteCombobox( custom_frame, completevalues=self.countries, match_function=starts_with_match, width=30 ) self.custom_combobox.pack(fill="x", pady=5) self.custom_combobox.set("")
def update_autocomplete_fuzzy(self, limit=10): typed = self.get() if not typed: self.filtered_values = self.completevalues[:limit] else: matches = process.extract(typed, self.completevalues, limit=limit) self.filtered_values = [match[0] for match in matches if match[1] > 60] self['values'] = self.filtered_values # ... rest same autocomplete combobox tkinter