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

Add focus color to CheckboxTreeview #112

Open
rbp9802 opened this issue Dec 26, 2024 · 0 comments
Open

Add focus color to CheckboxTreeview #112

rbp9802 opened this issue Dec 26, 2024 · 0 comments

Comments

@rbp9802
Copy link

rbp9802 commented Dec 26, 2024

Hello, I manage to solve this issue butc couldn't add a request.

I was trying to highlight selected row on the tree when especifying selectmode of the tree and realized is not incorporated.

tree = CheckboxTreeview(root, selectmode=tk.BROWSE)  # for only 1 selected item 
tree = CheckboxTreeview(root, selectmode=tk.EXTENDED)  # for multiple selected items

I added setected color in __init__ function (#0078d7 for windows):

style.map("Checkbox.Treeview",
                  fieldbackground=[("disabled", '#E6E6E6'), ('selected', '#0078d7')],
                  foreground=[("disabled", 'gray40'), ('selected', '#ffffff')],
                  background=[("disabled", '#E6E6E6'), ('selected', '#0078d7')])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant