How to change COLOR bounding boxes in a table view

I have already tried the following code from Delete grid line in tableView , but this allows me to change the color of the vertical line, not the color of the horizontal line.

So, I'm trying to change the white color of the border line, which you can see in the image below, how would I change this color? I am using JavaFX with CSS.

Tableview

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;
}
+4
source share
1 answer

to change both vertical and horizontal border color you can use the following code in your css:

.table-row-cell{
-fx-border-color: red;
-fx-table-cell-border-color:red;}

In addition, you can change the border of the entire table (and not the inner borders) with the following code:

.table-view{
-fx-border-color: red;}
+7
source

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


All Articles