mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #1046] No way to set color on individual list items #759
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#759
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SamWhited on GitHub (Oct 25, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/1046
The treeview provides a way to set the color on individual items in the tree, but the list view does not. It can still be done by using style tags in the text itself, but when this is done the various styles on list view (ie. setting the highlighted style) no longer work which is confusing and also means that if the list text has meaning you have to strip style tags out of it first before you can use it.
It would be nice to have a way to add a list item with specific styles set, or have a way to get the text of list items without styles tags included and have any styles set on the list override those style tags.
In my particular case I have a file opener UI which can swap between a tree view of the filesystem or a list view, but it's proving hard to ensure the styles remain consistent (and if I get the filename from the list it has style tags in it that have to be split out).
TextAreaprimitive #1039