Skip to content

TreeControl nodes get underlined and stay that way when hovered over #405

Answered by jeffwright13
jeffwright13 asked this question in Q&A
Discussion options

You must be logged in to vote

If I edit _tree_control.py and I change

        if node.id == self.hover_node:
            label.stylize("underline")

to

        if node.id == self.hover_node:
            label.stylize("underline")
        else:
            label.stylize("not underline")

then the underline disappears when the node is not hovered over.

I don't know if this is something @willmcgugan would be interested in incorporating into a new version of Textual. I guess in the meantime I'll see if I can ship my package with an altered version of _tree_control.py.

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jeffwright13
Comment options

@ThatXliner
Comment options

Comment options

You must be logged in to vote
2 replies
@rodrigogiraoserrao
Comment options

@jeffwright13
Comment options

Answer selected by jeffwright13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants