<@U6L2XCXU2> commented on <@U0F3291QE>’s file <htt...
# tornadofx
u
@aayush commented on @edvin’s file https://kotlinlang.slack.com/files/U0F3291QE/F77P5TLBZ/-.kt: @edvin I was using this code to change the background color of treetableview's child item. I already have a css written for treetableview
Copy code
.custom-tree-table-header .column-header-background{
    -fx-background-color: rgba(255, 255, 255, 0.0);
}
.custom-tree-table-header .table-column{
    -fx-background-color: rgba(0, 0, 0, 0.4);
}
.custom-tree-table-header .label {
    -fx-text-fill: white;
    -fx-font-weight: normal;
}

.custom-tree-table-header .tree-table-row-cell{
    -fx-background-color: rgba(255, 255, 255, 0.0);
    -fx-text-fill: black;
    -fx-border-color: #b9bacc;
    -fx-table-cell-border-color:#b9bacc;
    -fx-border-width: 0.2px;
}
.custom-tree-table-header .tree-table-cell{
    -fx-background-color: rgba(255, 255, 255, 0.0);
}
.custom-tree-table-header .tree-table-row-cell:selected {
    -fx-background-color: #3f465d;
    -fx-table-cell-border-color: #3f465d;
    -fx-text-fill: white;
}
But as you can see in the gif the css breaks when the child item is selected because of the inline style
Copy code
style{
                                        backgroundColor += Color.rgb(255, 255, 255, 0.3)
                                    }
The css works fine if I remove the setrowfactory part. Is there a way to add selection css for the child item?