Combobox Requires Two Clicks To View The Valuelist

Servoy 4.1.3
Windows Vista

I have a form with a combobox associated with a valuelist that is populated at run-time. In Smart Client, when I click on the combobox for the first time, the associated valuelist is displayed, however, only the very first item in the valuelist is shown. If I click on the combobox a second time, then the entire valuelist is displayed. Once the entire valuelist has been displayed, I can click on other form elements and then click back on the combobox, where the entire list is always displayed.

How do I get the entire valuelist to display on the first click?

Thanks!

kwpsd:
Servoy 4.1.3
Windows Vista

I have a form with a combobox associated with a valuelist that is populated at run-time. In Smart Client, when I click on the combobox for the first time, the associated valuelist is displayed, however, only the very first item in the valuelist is shown. If I click on the combobox a second time, then the entire valuelist is displayed. Once the entire valuelist has been displayed, I can click on other form elements and then click back on the combobox, where the entire list is always displayed.

How do I get the entire valuelist to display on the first click?

Thanks!

Do you have a small sample to illustrate this issue ? You use setValueListItems to populate the valuelist ?

This is what is displayed the first time the combobox is clicked:

This is what is displayed clicking off the combobox:

This is what is displayed clicking on the combobox a second time:

Here is the code that creates the valuelist for the combobox:

This seems like even the first time the values are there, but the combo list has scrolls and doesn’t show all values. When/how do you call getSpeciesOnProtocol ? I tried a small example but it works well. If you have a sample you can add a case in our support system.

‘getSpeciesOnProtocol()’ is invoked by the ‘onFocusLost’ event of yet another combobox field called the Protocol Number’.

I removed ‘getSpeciesOnProtocol()’ from the ‘onFocusLost’ event of the ‘Study Number’ field and added it to the ‘onDataChange’ event. Doing this resulted in the full display of the Species combobox list every time. I then reversed the change back to the ‘onFocusLost’ event, and the problem returned.

So, the problem is somehow associated with the ‘onFocusLost’ event of the other combobox.

You can add a case in our support system and we’ll have a closer look at the issue.

kwpsd:
‘getSpeciesOnProtocol()’ is invoked by the ‘onFocusLost’ event of yet another combobox field called the Protocol Number’.

I removed ‘getSpeciesOnProtocol()’ from the ‘onFocusLost’ event of the ‘Study Number’ field and added it to the ‘onDataChange’ event. Doing this resulted in the full display of the Species combobox list every time. I then reversed the change back to the ‘onFocusLost’ event, and the problem returned.

So, the problem is somehow associated with the ‘onFocusLost’ event of the other combobox.

dont think we can really do much about this. focus based events shouldnt touch data if possible. But just the field itself
Focus events are not reliable in this way.

in your case the other combobox already has focus and then onfocuslost is called on the first. So the lost event is a bit to late filling in the data for the other combo

Cant you do it with relations instead of filling the the valuelist values yourself?