JavaFX8 - remove selection of selected row

When I click on a row in a TableView , the row will be highlighted in blue. How can I disable this feature? I already tried to set the background to white, but the problem is that the color of the line is not white in each line. Does anyone know what to do?

Best wishes

EDIT:

In the image below you see the blue color of the second line. This highlight must be removed.

enter image description here

0
source share
1 answer

If you really want this (I agree with @kleopatra in the comments that this will make life difficult for the user), you can return the colors for the selected lines using an external css file:

 .table-row-cell:filled:selected { -fx-background: -fx-control-inner-background ; -fx-background-color: -fx-table-cell-border-color, -fx-background ; -fx-background-insets: 0, 0 0 1 0 ; -fx-table-cell-border-color: derive(-fx-color, 5%); } .table-row-cell:odd:filled:selected { -fx-background: -fx-control-inner-background-alt ; } 
+1
source

Source: https://habr.com/ru/post/979264/


All Articles