Akascape / CTkListbox

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

Query every options from the listbox #64

Closed jipen closed 1 month ago

jipen commented 1 month ago

Method to get the list of every options of the listbox:

def get_options(self) -> list[str]:
        """
        Get all the options of the listbox
        """
        options_buttons = list(self.buttons.values())
        return [btn.cget("text") for btn in options_buttons]
Akascape commented 1 month ago

@jipen There is already .get method, .get("all") returns all the values

jipen commented 1 month ago

My bad, I didn't notice that...