Hi,
I don't understand what is happening here. I put 2 Comboboxes on a form. In the onchange I check if the Text is already in the itemlist of the combobox. If it already occurs, I color the text. At least that was the intention. If I change the text color then the whole text is selected. See the difference between the combobox1 and 2. If I enter an "a" in combobox1, the text is immediately selected. This does not happen with combobox2. It seems that "ComboBox1.Font.Color" does something with the selection when used in the onchange event.
The automatic selection only happens when there are items in the itemlist. If the itemlist is empty, setting the font color works fine. Turning off Autoselect makes no difference. (Windows 11, Lazarus 4.6)