0 Replies Latest reply: Oct 30, 2012 12:41 AM by 963010 RSS

    ComboBox selection not reset to top of dropdown list (items) in javafx2.2

    963010
      I have a Source ComboBox to populate source fields (25-30 items) shown below in first page

      "A"

      "B"

      ...

      "Z"

      I have selected last item from ComboBox as shown below

      "Z"

      and when traversing to the next page after saving, i need to make the source combo selection blank, so i have return the below code to reset the Source combobox to point to first item (to reset the display to start from top of dropdown list for user selection)

      // my first value in source List is empty space - “”

      sourceComboBox.setValue("");even if you use below code snippets like

      sourceComboBox.getSelectionModel().selectFirst();
      sourceComboBox.getItems().clear();
      sourceComboBox.getSelectionModel().clearAndSelect(0);but when i click open the combobox dropdown it still shows dropdown display from bottom as shown below

      ...

      "X"

      "Y"

      "Z"

      I am unable to post images for representing combobox values, so has put in above examples.

      This looks like a graphics bug to me with combobox javafx 2.2 or am I doing something wrong?