Tornadofx CSS 选定的行

Tornadofx CSS Seleccted row

我正在尝试更改所选行的背景颜色,对于列表视图也是如此,就像我做 cell{backgroundColor += Color.BLACK} 时一样有效,但它会删除或至少使选择颜色变黑我已经尝试了下面的但那个不要悲伤地工作。感谢您的宝贵时间!

val tableView by cssclass()

tableView {
    tableRowCell {
        selected {
            backgroundColor += Color.RED
        }
    }
}

使用 and() 函数

    tableView {
        tableRowCell {
            and(selected) {
                backgroundColor += Color.GREEN
            }
        }
    }