mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #621] Support color control for DropDown lists #458
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#458
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 @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.
@rivo commented on GitHub (Jun 24, 2021):
I added a function
SetListStyles()which should do what you want. Since I haven't switched totcell.Styleobjects 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.