steff9488 steff9488 - 1 year ago 396
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download