Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ComboBox case sensitive dropdown

Tags:

c#

winforms

I have a ComboBox control of DropDown type which contains items "AAA", "Aaa", "Aa+", etc.

The problem is: If I type Aaa, item "AAA" highlighted as selected, not "Aaa". I assume combobox uses FindString to find SelectedItem - so search result is equivalent to first matched item by case-insensitive string.StartsWith.

What do I need to change to override this behavior?

I need to be able to type in the ComboBox.

Is there a method in winforms I could override or some kind of property akin to WPFs IsTextSearchCaseSensitive property from sll's answer?

like image 375
Roman Goyenko Avatar asked Mar 30 '12 22:03

Roman Goyenko


1 Answers

If you are using WPF, just set IsTextSearchCaseSensitive property to true.

like image 71
sll Avatar answered Oct 30 '22 23:10

sll