What's driving the re-color operation? Multiple s...
# tornadofx
c
What's driving the re-color operation? Multiple selections?
k
The chip re-colors when the stackpane is clicked - we have an event filter tracking that, and then it triggers a function we have to re-color all the elements in the stackpane.
g
you could add CSS classes to the affected elements instead of directly changing the colour, and then drive the colour purely from the stylesheet
e.g.,
Copy code
myPane.onClick {
    affectedNodes.each { it.toggleClass("is-selected") }
}
k
@Gary Tierney That actually looks like a wonderful solution! I've been having trouble getting the stylesheet to recognize the 'Rectangle' object, which is what we're using for the background of the chips, though.