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

php - cannot display multiple markers in google maps v3 from traceroute result -

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

javascript - firefox memory leak -