Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8091226

Need the ability to prevent a Control from receiving focus

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u25
    • javafx

      We need the ability to mark a Control as never receiving focus.

      The focusTraversable property is nice, but not sufficient. That property won't prevent a control from receiving focus when clicked on.

      There are at least 2 use cases when you don't want a control to receive focus:
       - when the control is in a toolbar
       - when the control (such as a combo box) is in a column header

      For the first use case, http://bekwam.blogspot.co.nz/2014/11/javafx-cut-copy-and-paste-from-toolbar.html describes the difficulty trying to work around it.

      For the second case, if you have a table where the items have many attributes you may want to allow the user to pick which attribute will be displayed in a column, leading to placing a combo box in the column header. When a user picks an item from the combo box, you don't want to steal focus from elsewhere.

            Unassigned Unassigned
            ngalarneajfx Neil Galarneau (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported: