Hello, I would like to know if the method enableWhen(...) can be used in this type of case:
button{
enableWhen({indexNavigation > 0})
}
How could I do it to make it work?
Hey @TioCoding if the indexNavigation anything that extends NumberProperty you can simply do:
button {
enableWhen(indexNavigation.greaterThan(0))
}
This will enable the Button everytime it is greater 0.
Here is the JavaDoc for the greaterThan
Thank you very much @nimakro , this served me a lot. :smile:
Most helpful comment
Hey @TioCoding if the
indexNavigationanything that extendsNumberPropertyyou can simply do:This will enable the
Buttoneverytime it is greater 0.Here is the JavaDoc for the greaterThan