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

ChoiceBox#setItems causes bizarre first selection behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8
    • 7u6
    • javafx
    • Windows 7 64 bit or OS X 10.7.4 64 bit

      If the user has never selected an item from a ChoiceBox, and the program calls setItems to change the list of its items, then the first time the user clicks on the control, an odd down arrow and slender box appear instead of the list of items. Rolling the mouse over the arrow reveals the item list. The behavior is extremely similar to http://javafx-jira.kenai.com/browse/RT-21891, which is marked as fixed in 2.2, but I'm observing this bug in 2.2.0-b21. I don't remember seeing it in 2.1, but I no longer have a 2.1 environment to test with.

      I've attached a test case where the ChoiceBox starts with no items. Clicking the "Populate" button calls setItems, after which clicking on the ChoiceBox shows the odd behavior. Similar behavior occurs if you initialize the ChoiceBox with some items but the user never selects one before the call to setItems.

            psomashe Parvathi Somashekar (Inactive)
            bmellejfx Bill van Melle (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: