New ComboBox entries not case sensitive

I have a pre-filled ComboBox where users can choose from the list or enter new text.
The problem is it stores rabbit genotypes which can have variations of the same word which are case sensitive.
The user cannot type in a new entry which is the same as an existing entry (but different case) without it automatically changing to an existing entry (same letters wrong case) on lost focus.
for example:
list contains - aaB_C_ddE_W_enen
cannot enter - aaB_C_DdE_W_enen
It just changes to the first one as soon as you leave the comboBox.
This occurs regardless of whether Allow Auto Complete is activated and doesn’t occur on Mac, only Windows.

Any ideas on this problem. I am really stuck.
I realise the combobox is made to not be case sensitive when you enter text that matches an existing list choice as it will prevent duplication.
But what if you want to add a word with the same letters as an existing entry but different case?

I think you will need to create your own control from an textfield and popup a menuItem in a containercontrol (so you can there add an arrow control or raw you own) …

A good feature request would be for Xojo to add a compare event so could make it case sensitive.

-karen

This has existed forever and a day :slight_smile:

See docs for “text comparison.” You can check case sensitivity.

https://documentation.xojo.com/topics/text_handling/comparing_text_values.html

You will need to use a mish-mash of string comparison and implement an auto-complete method to suit your needs.

I’m not sure how this relates to the comboBox control.

Try this please -
Create a comboBox on a form in Windows and add a lowercase “a”

comboBox1.addRow "a"

Run the Window and enter an uppercase “A” in the comboBox
Click on the comboBox drop-down arrow.
The comboBox text changes to “a”
It will always change to the matching text that exists on the list (Windows only). If both case choices exist it will change to the opposite case.