CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

Bind method doesn't work with the combobox

Open ZeyadMoustafaKamal opened this issue 3 years ago • 2 comments

I am using the bind method to search for a value from combobox values (they are 2500 value). but when I run the code I didn't get anything. and this is my a part of mycode

root = ctk.CTk()
root = ctk.CTk()
root.geometry('400x240')
root.title('Cryptocurrencies scraping')
lst=date_range()

def check_input(event):
    value = event.widget.get()
    if value == '':
        combo_from['values'] = lst
    else:
        data = []
        for item in lst:
            if value.lower() in item.lower():
                data.append(item)
        combo_from.configure(values=data)
        print(data)
combo_from=ttk.Combobox(root,values=date_range())
combo_from.bind('<KeyRelease>', check_input)
combo_from.pack(side='left')

Note:date_range is a function that returns all dates from 2015 to now.

ZeyadMoustafaKamal avatar Nov 29 '22 17:11 ZeyadMoustafaKamal

Its not implemented in the current version, it will work with version 5.0.0

TomSchimansky avatar Nov 30 '22 01:11 TomSchimansky

Its not implemented in the current version, it will work with version 5.0.0

When the version will be available ,thank you for doing all of this for us.

ZeyadMoustafaKamal avatar Nov 30 '22 11:11 ZeyadMoustafaKamal

Binding should now work with version 5.0.0.

TomSchimansky avatar Dec 02 '22 12:12 TomSchimansky