Check if a field is bindBidirectional (Javafx)

Asked

Viewed 34 times

2

Good morning!! I wanted to know how I check if a field is with Binding (javafx) I have the following field:

txt2.textProperty().bindBidirectional(txt1.textProperty());

Have a button to enable or disable bindBidirectional, depending on the current state. If you have bind: disable, if not: activate. valeuu

1 answer

0

Just use the . isBound() method of the property:

if(txt2.textProperty().isBound()){
    // Propriedade linkada
}else{
    // Propriedade não linkada
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.