how would I go about binding the textProperty of two textfields to a button's
disable (on/off)? Here is an example of binding to 1 textfield. I like to
know how to do similar but with 2 or more textfields.Basically, if two
textfields are empty, the submit button is disable, else.#!/usr/bin/env groovy
import static groovyx.javafx.GroovyFX.start
start {
stage title: "Test App", visible: true, {
scene {
hbox {
tf = textField(id: "tf")
button('Submit', id: "smb", disable:
bind(tf.textProperty()).using { it.isEmpty() })
}
}
}
}