Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Combo drop down list showing empty

I found that an Edit Line subclassed as a Combo Drop Down in an existing application had some behavior change with the latest update of the SRPControls. The problem was that when a value was typed into the edit line that did not match any of the data in the drop down list, it would seem to clear out the data from the drop down list altogether, and nothing could bring the data back. Deleting the value and retyping a valid matching value still had and empty drop down list.

I tested differing variations of the Array to pass into the parameter for the Combo property. I found that the only way I could get it to not lose the data in the drop down listbox was to set the value <2, 9> (Filtered Autofill) to True. Any other combination of the other Array items didn't make a difference. Are you finding this same problem with Filtered Autofill set to False, or is it unique to my setup?

As you would expect, the Combo Drop Down in the SRP Edit Table control behaved exactly the same way.

Here is a copy of the code used to set the Combo property.

PmtTypeInd = '1':@STM:'2':@STM:'3':@STM:'4':@STM:'5':@STM:'6':@STM:'7' PmtType = "Cash" :@STM:"Debit" :@STM:"Credit":@STM:"Check" :@STM:"Gift Card" :@STM:"Charge to Acct" :@STM:"COD" TypeData = "" TypeData<1> = 1 TypeData<2, 1> = "":@TM:"Pmt Type" TypeData<2, 2> = "L":@STM:25:@TM:"L" TypeData<2, 3> = PmtTypeInd:@TM:PmtType TypeData<2, 4> = 2 ;// column # that contains the values we care about TypeData<2, 5> = 1 ;// auto fill on TypeData<2, 6> = 0 ;// case sensitive off TypeData<2, 7> = 10 ;// 10 visible rows max TypeData<2, 8> = 0 ;// Don't fire the OnOptionClick TypeData<2, 9> = 0 ;// Don't Reduce the list to partial matches TypeData<2, 10> = 1 ;// Show immediately TypeData<2, 11> = 0 ;// Do not use LIST Format TypeData<2, 12> = 1 ;// Autofill on first column TypeData<2, 13> = 0 ;// Dont Hide dropdown when user clears cell TypeData<2, 14> = 0 ;// Let navigation keys show the drop down TypeData<2, 15> = 0 ;// Show the drop down regardless of the cell's contents TypeData<2, 16> = 0 ;// True = Dont Show the drop down during autofill TypeData<2, 17> = 1 ;// Remove selection when user backspaces/deletes TypeData<2, 18> = 1 ;// Show Popup while in read only mode TypeData<2, 19> = 1 ;// Show Popup When Navigating TypeData<2, 20> = 1 ;// Always Tab Out on Enter TypeData<2, 21> = -1 ;// Always show the dropdown above when close to the screen bottom TypeData<2, 23> = 1 ;// Limit to list on dropdown Convert "." To ";" In CtrlId Set_Property(@Window:".OLE_SUBCLASS", "OLE.Combo[":CtrlId:"]", TypeData)

Comments

  • Thank you for posting enough code to make it easy to duplicate. Yes indeed...I was able to duplicate the problem.

    Kevin will review and confirm, but I believe there is a bug when the data is formatted as a LIST rather than an ARRAY. If I rotate your array (which is easy to do with the SRP_Array function), and set <2, 11> to 1, it works as I would expect. So you have a workaround for now in case you needed it, but have no doubt we'll fix this soon.
  • Thanks Don for the workaround.

    Just to clarify, did you mean that there is a bug when the data is formatted as an ARRAY rather than a LIST? Setting <2, 11> to True means that the data is passed in LIST format rather than ARRAY. My current code is passing the data as an ARRAY.
  • Yes, that is correct. I was reversing the format terms.
  • Try 4.1.0 RC3. The problem should be fixed.
Sign In or Register to comment.