【问题标题】:Tornadofx CSS Seleccted rowTornadofx CSS 选定行
【发布时间】:2019-01-05 13:03:04
【问题描述】:

我正在尝试更改所选行的背景颜色和相同的列表视图,就像我做cell{backgroundColor += Color.BLACK} 时一样,但它会删除或至少使选择颜色变黑我已经尝试过下面的方法,但遗憾的是 dossnt 工作。感谢您的宝贵时间!

val tableView by cssclass()

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

【问题讨论】:

    标签: css kotlin tornadofx


    【解决方案1】:

    使用 and() 函数

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

    【讨论】:

    • 是的,谢谢,我想通了,但忘记了这篇文章。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-10
    • 1970-01-01
    • 2019-10-07
    • 2018-03-04
    • 1970-01-01
    • 2019-01-23
    相关资源
    最近更新 更多