steff9488 steff9488 - 3 months ago 83x
CSS Question

JavaFX change the blue color of the TableView selection row bar

Everything I found searching for an hour does not work in my

with javaFX8, the selection row bar still is always blue.

Tried all of this:

Javafx ListView selection bar text color when using CellFactory

How do i change the color of the blue
selection row bar?


As you can see in the screenshot I have different text styles set in the cellFactory of some columns and it's hard to read with this dark-blue.


Have you tried to set the CSS style class?

.table-row-cell:selected {
    -fx-background-color: #005797;
    -fx-background-insets: 0;
    -fx-background-radius: 1;

Put this code in a CSS file and then add the file to the list of CSS stylesheets of the table view.