Akascape / CTkListbox

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

Can curselection and activate methods be supported? #6

Closed codedreamin closed 1 year ago

codedreamin commented 1 year ago

Are the base Tkinter Listbox methods curselection and activate, currently supported and if not could they be added? Thanks!

Akascape commented 1 year ago

@codedreamin can you explain what these options do?

codedreamin commented 1 year ago

@Akascape yeah,

curselection()

Returns a tuple containing the line numbers of the selected element or elements, counting from 0. If nothing is selected, returns an empty tuple.

activate ( index )

Selects the line specifies by the given index.

The reason I ask is that I have a listbox of user created groups, I give them an option to give it an alias and when they do it deletes the old selection from the listbox and then re-adds it with the new alias.

When this happens the group witht he new alias name is no longer highlighted. I'm trying to figure out a solution for this. If there already exists a good solution to this issue that I don't know about I'd be happy to hear it.

Thanks!

Akascape commented 1 year ago

@codedreamin Ok thanks, I will try to add these options soon.

Akascape commented 1 year ago

@codedreamin Added curselection and activate methods. Please update (pip install ctklistbox --upgrade)

codedreamin commented 1 year ago

Great, thank you! Works great.