1

I have an issue with the comboBox dropdown list. When I have similar items for example "R20 SysHealth" and "R20" in my list. When "R20" is the selected text and I click to show the dropdown list it hightlights the "R20 SysHealth" instead of "R20" so its not comparing the exact string. Has anyone come across this before? if not can you turn of the highlighting?

enter image description here

Community
  • 1
  • 1
NOZ77
  • 69
  • 6

1 Answers1

0

You might want to use the FindStringExact member method of CComboBox instead of just FindString.

thomiel
  • 2,467
  • 22
  • 37
  • I do use FindStringExact to set the selected item in the Combo List which is fine. The issue is when you click the control and the drop down list appears it highlights the wrong item in the list as shown above. I'm assuming it within the ComboBox class code itself. – NOZ77 May 15 '20 at 09:01
  • Ok, I assumed you selected the item programatically... You should then opt to have the list sorted alphabetically. This way the RF20 would be selected first. – thomiel May 15 '20 at 11:43