Akascape/CTkListbox

support for .index(option)

BhagyaJyoti22006 opened this issue · 3 comments

How can I know the index of a given option in the listbox, if it exists. I have an option which is selected. Now, I want to select the option just below it and just above it. I could do it if i know its index. Index can be obtained by any external loops. I was wondering if there is any pre-built function, or do you have anything in mind?

Note: I know curselection exists. But it only returns the selected indexes. I want that it returns index of the input string. And return None if it doesnt exist.

@BhagyaJyoti22006 Use .get(index) method

Thanks mate!