Assign If Null If you have a reason for wanting t...
# tornadofx
e
#### Assign If Null If you have a reason for wanting to recreate the graphic property for a list cell, you can use the
assignIfNull
helper, which will assign a value to any given property if the property doesn't already contain a value. This will make sure that you avoid creating new nodes if
updateItem
is called on a cell that already has a graphic property assigned.
Copy code
kotlin
cellFormat {
    graphicProperty().assignIfNull {
        label("Hello")
    }
}
👍 1