Is there a way to constantly show combobox popup? The question was about datepicker, but it is a descendant of combobox. I want to call show() method of combobox and then constantly show it until stage is closed. The best thing that it got till now is
showingProperty().addListener({ ov, old, newValue ->
if (!newValue) this.show()
})
It kinda works, but it hides popup and then shows it, and that is inconvinient.
The bad solution
Take the popup content out of the date picker skin and use it like any other node. Note that the date picker itself must have been rendered as part of the scene at least once for the skin to have been initialized. There may be a more clever way to initialize the skin.
Full example code at github.
The good solution
Use a control made specificly for your purpose, like CalendarPicker from JFXtras.
http://jfxtras.org/
If you could override the hide() method of the ComboBoxBase method, you would be able to prevent the control from closing. You would have to make a new class, like alwaysOpenDatePicker and let it extend the javafx scene datapicker class. In that class you could override the hide() method, in which you would do nothing.
I'm not sure if this would work, I'm just thinking out loud. I guess it's worth a try, let me know if it worked :).
And a link to the ComboBoxBase page: https://docs.oracle.com/javafx/2/api/javafx/scene/control/ComboBoxBase.html