ComboBox selection not reset to top of dropdown list (items) in javafx 2.2


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





I have selected last item from ComboBox as shown below


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 - “”


even if you use below code snippets like


but when i click open the combobox dropdown it still shows dropdown display from bottom as shown below





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

This looks like a graphics bug to me or am I doing something wrong? I have seen similar issue reported in below question but no work around suggested so far Combobox clearing value issue

5/23/2017 11:48:11 AM

If you want to simply "reset" the combo box, I think all you have to do is set the value to null, like so:

1/29/2014 4:29:15 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow