-1

I have a PopOver ControlsFX and I want to create an event every time disappears. You searched information and I think it is done with the method onHiddenProperty but I cannot apply it correctly.

fabian
  • 80,457
  • 12
  • 86
  • 114
Zuri
  • 187
  • 1
  • 8

1 Answers1

1

You can check if it has lost the focus which means that the popover disappears:

popOver.focusedProperty().addListener((observable, oldValue, newValue) -> {
    if (oldValue){    
        // oldValue is true -> current value is false-> no focus               
        // TODO your code here
    }
});
Argus
  • 26
  • 1