[GH-ISSUE #621] Support color control for DropDown lists #458

Closed
opened 2026-03-04 01:05:10 +03:00 by kerem · 1 comment
Owner

Originally created by @gdamore on GitHub (Jun 17, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/621

I've got some rather rich styling taking place, and I've used derived types to override the SetFormAttributes() on my types to change the colors to match the theme requirements for my application.

Unfortunately the one thing that I can't control is the colors of the pulldown list. I'd really like to have direct color control for both the highlighted item, as well as the other items, and I'd like to be able to do this independently of other styles. (Currently the attached list is totally private, and uses the Styles.Primitive* colors. This gives me no change to change this unless I want to just wholesale copy the implementation.

What I'd propose:

SetListBackgroundColor()
SetListTextColor()

Although as I've indicated elsewhere, I really think this should just be a single SetListStyle(), and SetListHighlightedStyle(). But if you want to retain the current color based implementation, then the above suggestions are probably what you'd want to use.

Originally created by @gdamore on GitHub (Jun 17, 2021). Original GitHub issue: https://github.com/rivo/tview/issues/621 I've got some rather rich styling taking place, and I've used derived types to override the SetFormAttributes() on my types to change the colors to match the theme requirements for my application. Unfortunately the one thing that I can't control is the colors of the pulldown list. I'd really like to have direct color control for both the highlighted item, as well as the other items, and I'd like to be able to do this independently of other styles. (Currently the attached list is totally private, and uses the Styles.Primitive* colors. This gives me no change to change this unless I want to just wholesale copy the implementation. What I'd propose: SetListBackgroundColor() SetListTextColor() Although as I've indicated elsewhere, I really think this should just be a single SetListStyle(), and SetListHighlightedStyle(). But if you want to retain the current color based implementation, then the above suggestions are probably what you'd want to use.
kerem closed this issue 2026-03-04 01:05:10 +03:00
Author
Owner

@rivo commented on GitHub (Jun 24, 2021):

I added a function SetListStyles() which should do what you want. Since I haven't switched to tcell.Style objects internally yet, the attributes will be ignored for now. But once I've done the transition, you'll also be able to set the attributes.

<!-- gh-comment-id:867800136 --> @rivo commented on GitHub (Jun 24, 2021): I added a function `SetListStyles()` which should do what you want. Since I haven't switched to `tcell.Style` objects internally yet, the attributes will be ignored for now. But once I've done the transition, you'll also be able to set the attributes.
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#458
No description provided.