Hello jamie, thank you for your reply and your suggestions.
I would suggest you use a standard TComboBox in Owner Draw mode and do all of the drawing the way you wish.
This would be too difficult and too much effort for me: I feel still as a beginner to the LCL (and because of a documentation, which often doesn't exist or I can't find it or it is much too short for me (example: see 'TFilterComboBox' below), I proceed only very slow and exhausting).
I saw that ComboBox and ComboBoxEx have an AutoComplete feature and found it "nice to have" and just wanted to "enable it in about a few minutes"...
But (because I found no usable documentation for e.g. TComboBoxEx.AutoCompleteOptions and whether AutoComplete works with all 'Style's or not and which 'Style' causes ReadOnly-Mode and which Style not or what are the differences of the 3 'TComboBoxEx.Style's - during testing I found none)
until now I invested about 30 hours for endless tests for endless combinations of various AutoComplete settings with all possible 'Style's for TComboBoxEx and for TComboBox on different Lazarus versions both on Linux and on Windows and endlees google searchs, where I found your bug report, which solved the problem on Windows, but unfortunately not on Linux (but I'm > 90% on Linux, so this would be much more important for me).
Sorry for crying, but I wrote this in the hope you can understand, that this suggestion would go beyond my limits for this small feature.
From your description however, it seems there could be a different way around this..
Have you looked at TFileterComboBox ?
I had never seen TFilterComboBox before and tried it. But
- it has no 'ReadOnly' property. Are you sure it can work in ReadOnly-Mode?
- it has no 'Items' or 'ItemsEx' property, so I didn't know how to populate it with my strings and started google, but:
-
https://lazarus-ccr.sourceforge.io/docs/lcl/filectrl/tfiltercombobox.html helped me absolutely nothing, because it doesn't explain anything, how to use it
-
https://wiki.freepascal.org/TFilterComboBox is complete empty
- I checked about 50 google results, but none of them explained, how to use TFilterComboBox, many of them I did not really understand, the only thing which I suppose now is, that additionally a TFileListBox or TDirectoryListBox could be needed (which I both never heared of), and so the answer to my question leads only to a new question...
So TFilterComboBox goes also for me beyond my limits for this small feature.
What I hoped is, that someone would find out, that my AutoComplete settings (see above) were wrong or that someone would know how to modify your patch, that is works on Linux too, so that I could use AutoComplete on Linux with a small, reasonable effort.