Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an equivalent option to .see(index)? #66

Open
ohshitgorillas opened this issue May 25, 2024 · 1 comment
Open

Is there an equivalent option to .see(index)? #66

ohshitgorillas opened this issue May 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ohshitgorillas
Copy link

ohshitgorillas commented May 25, 2024

I have a very long listbox of 60+ items that runs off the screen. Basically, this is data reduction software, so the user is viewing an analysis, clicks next, views the next analysis, and the listbox will update to highlight the currently viewed analysis.

This is all well and good until clicking "Next" starts to highlight analyses which runs off the screen. The listbox keeps highlighting analyses lower and lower, but the user has to manually scroll down to see where they are in the list.

With a tkinter listbox, this was as easy as implementing a line listbox.see(index), however, CTkListbox doesn't seem to have a .see(index) option.

If there's another way to keep the position of the scrollbar updated so that the current sample is highlighted, I'd love to know about it. Otherwise, I'd like to request an equivalent option to .see(index) that will always keep the highlighted index visible.

@Akascape Akascape added the enhancement New feature or request label May 26, 2024
@Akascape
Copy link
Owner

Akascape commented May 26, 2024

@ohshitgorillas I will add the .see option in next update, for now you can use this method to change the scrollbar to bottom

listbox._parent_canvas.yview_moveto(1.0)

or

listbox._scrollbar._command("moveto", 1.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants