This control mirrors the functionality of the VCL one and uses many of the same routines. The way Value/Key pairs work in RTL goes back to Delphi 1.0 in the mid 90s.
For things with duplicate values, ItemsHaveValues and the Delphi RTL key/values, its has always been this way. IWComboBox mirrors TComboBox in behavior as it shares the same RTL routines.
I suggest using alternate methods or keys in such cases as would need to be done with TComboBox as well. There are many ways, but one is to simply store a parallel 1:1 TStringList which contains your information matched up by index as a private or protected field. This is often done this way in normal VCL apps as well.
"I don't see any requirement for that in the way TStringList or TIWStringList work"
TStrings has built in methods for the keys and values, and its how they work. They dont deal with duplicates.
http://www.delphigroups.info/2/6/325181.html
For things with duplicate values, ItemsHaveValues and the Delphi RTL key/values, its has always been this way. IWComboBox mirrors TComboBox in behavior as it shares the same RTL routines.
I suggest using alternate methods or keys in such cases as would need to be done with TComboBox as well. There are many ways, but one is to simply store a parallel 1:1 TStringList which contains your information matched up by index as a private or protected field. This is often done this way in normal VCL apps as well.
"I don't see any requirement for that in the way TStringList or TIWStringList work"
TStrings has built in methods for the keys and values, and its how they work. They dont deal with duplicates.
http://www.delphigroups.info/2/6/325181.html

