ComboBox - Limit to List

Do you have a combobox that only allows the Edit Box to a part/all of the combobox list items.  This therefore restricts the user to enter only VALID  list items.  Entering an invalid char should just beep!!!

LUCombo does not seem to have this functionality, as you can enter enter anything in the Editbox.


Have you tried to set LUCombo.Style = csDropDownList?

Yes.  However, functionality is not the same.  LUCombo.Style = csDropDownList, changes the Edit box to grey and typing muliple chars and then deleting (ie Backspace) does not seem to function the the same as an Edit box.


You're correct.

So,I understand you need editing but limiting at the same time. When do you expect the limiting correction to happen? On focus leave? 

Id expect the limit correction to happen as you type eg Items StringList contains :-
a
aa
b
bb

Type a, automatically select item 1 in dropdown
Type a, automatically select item 2 in dropdown
Type x, Beep and ignore keystroke
Backspace (delete second 'a'), automatically select item 1 in dropdown

There is also clipboard behavior that would need to be controlled. All in all, it isn't that trivial.