-
Notifications
You must be signed in to change notification settings - Fork 112
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
Combobox selection error #136
Comments
Hi, can you share the steps to reproduce this? Last time I checked the behavior was the same with the default theme, and the selection went away when another widget was focused. |
You can recreate this by running the Widget demo, and changing the value of the readonly combobox to anything, and then click on anythingelse to change the focus |
Hmm, I see no difference, except that with clam the selection is grey when unfocused. sv-ttk: Képernyőfelvétel 2024-04-27 18-11-26.webm clam: Képernyőfelvétel 2024-04-27 18-14-03.webm ps: forgot to record the mouse :D |
default theme: Képernyőfelvétel 2024-04-27 18-34-41.webm |
And yes, there's a difference between the three, though I'm not sure which behavior |
huh, weird. for me without any themes it does this: 0427.mp4As you can see, whenever the focus is taken away from the combobox, the blue background disappears. |
I also encountered this problem. In the default theme, the highlight is removed when the widget loses focus, but in sv-ttk the highlight remains. The solution for me is as follows (https://stackoverflow.com/a/71531095): def on_select(event):
selected = var.get()
combobox.set("")
combobox.set(select)
combobox.bind("<<ComboboxSelected>>", on_select) |
After selecting any item from a combobox, the text highlight stays, even when the combobox no longer has focus. (in both light and dark theme)
With theme:
Without theme (how it should be):
The text was updated successfully, but these errors were encountered: