My application uses row select mode ( table.setCellSelectionEnabled(false))
table.setCellSelectionEnabled(false)
In my CSS:
.table-row-cell:selected { -fx-background-color: steelblue; -fx-text-fill: red !important; }
the property is -fx-background-colorworking fine but -fx-text-fillnot working. The text color of the selected line is black (if TableViewnot focused) or white (if focused TableView).
-fx-background-color
-fx-text-fill
TableView
This works for me, although there may be simpler ways:
.table-row-cell:selected { -fx-background-color: steelblue; } .table-row-cell:selected .text { -fx-fill: red ; }
JavaFX 8, Modena, ( , ). , ( ):
.table-row-cell:selected { -fx-background-color: steelblue; -fx-text-background-color: red; }