Hy.
I've created a form and on it i have a combobox (with the "dropdown" type) with items that are similar to each other, for example :
"test", "Test", "TEST"
Now, when i run the application and i have "TEST" selected in the combobox, when i press the button to show the dropdown list of the combobox it will always show "test" as selected. If i select from the combo "TEST" and reopen the list it will always show "test".
From what i can see, the listbox attached to the combobox selects the items with a case insensitive method.
How can i make the combobox select the correct value when the dropdown list is shown?
P.S. i've tried this on C# and C++/CLI and both do the same thing.
P.S.2 Here's the sample (the combobox initialisation part) that i was trying :
|
this.comboBox1=newSystem.Windows.Forms.ComboBox();
this.SuspendLayout();
|
| //
|
| //comboBox1
|
| //
|
| this.comboBox1.FormattingEnabled=true;
|
| this.comboBox1.Items.AddRange(newobject[]{
|
| "sometext",
|
| "test",
|
| "TeSt",
|
| "TEST",
|
| "teST",
|
| "anothertext"});
|
| this.comboBox1.Location=newSystem.Drawing.Point(109,37);
|
| this.comboBox1.Name="comboBox1";
|
| this.comboBox1.Size=newSystem.Drawing.Size(121,21);
|
|
this.comboBox1.TabIndex = 0;
|