[GH-ISSUE #379] How to set display attributes (bold, underline, reverse etc.) on a TreeNode? #280

Closed
opened 2026-03-04 01:03:35 +03:00 by kerem · 2 comments
Owner

Originally created by @polyzium on GitHub (Dec 15, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/379

I'd like my applications to be compatible with real DEC VT terminals. Applications using tcell/tview like to discard colours if TERM=vt*** e.g. vt320. When I was about to fix an application, I couldn't find SetAttribute or something like that for TreeNodes. So for example if I want to set the currently selected TreeNode in a TreeView, for xterm or similar I simply set the color using SetColor. But if I want to indicate that on DEC VT320 for example, I need to set the underline attribute on that node, and I don't have the function for that.

Originally created by @polyzium on GitHub (Dec 15, 2019). Original GitHub issue: https://github.com/rivo/tview/issues/379 I'd like my applications to be compatible with real DEC VT terminals. Applications using tcell/tview like to discard colours if `TERM=vt***` e.g. `vt320`. When I was about to fix an application, I couldn't find `SetAttribute` or something like that for `TreeNode`s. So for example if I want to set the currently selected `TreeNode` in a `TreeView`, for `xterm` or similar I simply set the color using `SetColor`. But if I want to indicate that on DEC VT320 for example, I need to set the underline attribute on that node, and I don't have the function for that.
kerem closed this issue 2026-03-04 01:03:35 +03:00
Author
Owner

@rivo commented on GitHub (Dec 29, 2019):

You'll want to prepend the text of your tree node with a color tag [::u]. That should do the trick.

<!-- gh-comment-id:569508954 --> @rivo commented on GitHub (Dec 29, 2019): You'll want to prepend the text of your tree node with a color tag `[::u]`. That should do the trick.
Author
Owner

@rivo commented on GitHub (Feb 19, 2020):

Will reopen if more information is needed.

<!-- gh-comment-id:588253961 --> @rivo commented on GitHub (Feb 19, 2020): Will reopen if more information is needed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#280
No description provided.