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

css - Text drops down with smaller window -

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

ruby on rails - Authlogic - how to make a registration and don't log in the new account? -