This control, sorry, is almost unusable for my purposes. My objective was to create a text entry field with a self learning autotext feature, just like most browsers have it nowadays.
Next 3 issues: cbactRetainPrefixCase/cbactSearchCaseSensitive don't work as expected (where it isn't easy to tell what to expect, because of a quite flimsy documentation). And: one [Backspace] key press deletes the complete input field, when the mouse is used to enter the text field, even though the AutoSelect marker is cleared. And the cursor position is broken, if you switch from mouse to keyboard input.
Issue #1: up/lowercase problems
Steps to reproduce: drop a combobox and a button onto a form. The button does not get any code, it's just there to move the focus away from the combobox. ComboBox settings:
AutoSelect:true
AutoDropdown:true
cbactEnabled: true
cbactEndOfLineComplete: true
cbactRetainPrefixCase:true
cbactSearchAscending: true
cbactearchCaseSensitive:true
fill the items list with some entries (names), add one with a case typo, like "JaGGger, Mick". Now try to correct this typo in the input field.
If you do, correctly, enter "Jagger, Mick", the input field (thanks to cbactRetainPrefixCase:true) will accept this, but if you exit the control ([Tab], click button) the text will revert to "JaGGer, Mick". No matter what arcane navigation I tried, I never managed to get "Jagger" after exiting the Combo-Box. Seems that on exit the cbactRetainPrefixCase:true and/or cbactearchCaseSensitive:true attribute is not honored.
Delphi XE7: unfortunately: same behaviour.
Now on to issue #2:
click on the button to move the focus away from the combobox. Now come back to correct the typo: click the
mouse just behind the "GG", and click again to clear the AutoSelect, and hit Backspace to clear the "G".
The whole input field is cleared.
Note that you can correct the "GG" typo, if you move into the text field using the
keyboard: set focus on the button, [Tab] or [Shift-Tab] until the combobox input field highlights, hit [Right-Arrow] to clear the Autoselect, hit [Left-Arrow] to position the cursor behind the "GG", and now you can use [Backspace] to clear the "GG".
It won't help you much, though, since as soon as you hit [Tab] to exit the field, Mr. Jagger will revert to "JaGGer" due to issue #1.
Delphi XE7: not an issue.
Issue #3
if you change cursor movement from mouse to keyboard, the control looses the cursor position. To reproduce, position the cursor behind the "GG" using the mouse, now press [Left-Arrow] to advance the cursor left: the cursor will jump to the end of the input field and then advance left 1 character to the 2nd character from the end.
Delphi XE7: not an issue.
Armin.