Prefix selection feature for ChoiceBox and ComboBox as requested for JavaFX in RT-18064

#496 Merged at 1b5b2c1
  1. Christoph Keimel

The utility class PrefixSelectionCustomizer can be used to customize a ChoiceBox or ComboBox and enable the "prefix selection" feature. This will enable the user to type letters or digits on the keyboard and the ChoiceBox or ComboBox will attempt to select the first item it can find with a matching prefix. As a convenience preconfigured classes are provided as controls.

See also:

Comments (8)

  1. Samir Hadzic

    This is like a new component right..?

    Could you create an issue in our issue tracker tagged as "proposal" so that we can discuss here the benefit of this new control, how the API should look like etc etc?

    Also don't forget to sign the CLA here if you want to contribute to ControlsFX

  2. Jonathan Giles

    Need two things: 1) add BSD license headers (just copy from another file and make sure the year is 2015), 2) more JavaDoc.

    I think we will merge this after 8.40.9 ships, as a feature for the next release.

  3. Christoph Keimel author

    I have added the BSD license headers and have added more JavaDoc. Please review.

  4. Christoph Keimel author

    Spawning from a comment to my article about this, I am wondering if we should also include special characters like punctuation marks in the prefix sequence. At the moment I check for (code.isLetterKey() || code.isDigitKey() || code == KeyCode.SPACE).

  5. Samir Hadzic

    I realized I needed that component badly for my application. I will merge that and I will test it. I hope you will help us fix it if we find some issues. (or improvements).

  6. Alex

    Very usefull control. It works fine with latin letters but ignore cyrillic ones. Is there any way out of the box to make it work with cyrillic letters?