tornadofx / tornadofx / dynamicContent


fun <S : EventTarget, T> S.dynamicContent(property: ObservableValue<T>, onChangeBuilder: S.(T?) -> Unit): Unit

Listen for changes to an observable value and replace all content in this Node with the new content created by the onChangeBuilder. The builder operates on the node and receives the new value of the observable as its only parameter.

The onChangeBuilder is run immediately with the current value of the property.