Lambda
Lambda

Reputation: 109

Tornadofx CSS Seleccted row

I am trying to change the background color selected row and the same for a listview like when I do cell{backgroundColor += Color.BLACK} that works but it removes or atlest makes the selection color black aswell I have tried the below but that dossnt work sadly. Thank you for your time!

val tableView by cssclass()

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

Upvotes: 2

Views: 180

Answers (1)

Wall0p
Wall0p

Reputation: 233

Use the and() function

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

Upvotes: 1

Related Questions