Skip to content

Add focus color to CheckboxTreeview #112

Description

@rbp9802

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')])

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions