JavaFX ListView Row Coloring -


i have lisview cell factory set. cell factory changes text color based on flags each row (black, red, green, blue, etc.)

when select row want change color of text white regardless of original color of text. because of text colors (such red , blue ) don't default -fx-selection-bar color.

i added following css snippet list view.

.list-view:focused .list-cell:filled:focused:selected  { -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, -fx-selection-bar; -fx-background-insets: 0, 1, 2; -fx-background: -fx-accent; -fx-text-fill: white; } 

it works fine, doesn't return text it's original color when selection changed 1 row another.

is there proper way this?

thanks.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -