Hi Tom,

lately I've been battling similar issues. One important thing I learned here is that if my custom control wraps a TextField in its skin I have to make sure that the custom control is not focus-traversable.

It also seems difficult to have focus on the custom control in terms of Node.focused while actual focus is on the TextField in the skin. ComboBox may have the same issue with its embedded TextField. At least the FakeFocusTextField inside the ComboBoxListViewSkin looks like a workaround for this. But I can't do the same because this uses (package) private API.

And the creative implementation of Node.FocusedProperty (to make sure that focus switch is an atomic change for focus change listeners) reminded me of Tomas' latest posting about "Suspendable listener notifications". This would be nice to have in FX so we don't need private workarounds...

http://tomasmikula.github.io/blog/2015/02/10/val-a-better-observablevalue.html

Werner

On 23.02.2015 09:03, Tom Eugelink wrote:
What would be the best way to forward the focusProperty of the
TextField to the control's focusProperty?

Reply via email to