I have already tried the following code from Remove grid line in tableView , but that only allows me to change the vertical line colour and not the horizontal line colour.
So, I am trying to change the white border line colour which you can see in the image below, how would I change this colour? I am using JavaFX with CSS.
Here is my CSS:
.table-view{
-fx-background-color: transparent;
}
.table-view:focused{
-fx-background-color: transparent;
}
.table-view .column-header-background{
-fx-background-color: #262626;
}
.table-view .column-header-background .label{
-fx-background-color: transparent;
-fx-text-fill: #0ed9e0;
}
.table-view .column-header {
-fx-background-color: transparent;
}
.table-view .table-cell{
-fx-text-fill: #0ed9e0;
-fx-alignment: center;
}
.table-row-cell{
-fx-background-color: -fx-table-cell-border-color, #2b2a2a;
-fx-background-insets: 0, 0 0 1 0;
-fx-padding: 0.0em; /* 0 */
}
.table-row-cell:odd{
-fx-background-color: -fx-table-cell-border-color, #262626;
-fx-background-insets: 0, 0 0 1 0;
-fx-padding: 0.0em; /* 0 */
}
.table-row-cell:selected {
-fx-background-color: #005797;
-fx-background-insets: 0;
-fx-background-radius: 1;
}
in order to change both vertical and horizontal color of borders you can use the following code in your css:
.table-row-cell{
-fx-border-color: red;
-fx-table-cell-border-color:red;}
Also, you can change the border of the whole table (not the inner borders) with the following code:
.table-view{
-fx-border-color: red;}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With