tview
tview copied to clipboard
Wrong color in DropDown SetListStyles
In the following code, I want to set unselected
background color to red.
package main
import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
)
func main() {
app := tview.NewApplication()
dropdown := tview.NewDropDown().
SetLabel("Select an option (hit Enter): ").
SetOptions([]string{"A", "AA", "AAA", "AAAA", "AAAAA"}, nil)
dropdown.SetListStyles(tcell.StyleDefault.Background(tcell.ColorRed), tcell.StyleDefault)
if err := app.SetRoot(dropdown, true).SetFocus(dropdown).Run(); err != nil {
panic(err)
}
}
This is before 03bdc867bee4ce7355079090c396d9ec861fc4bb
This is after 03bdc867bee4ce7355079090c396d9ec861fc4bb, some areas did not change to red.