Search code examples
delphitcombobox

How to avoid the user types into a TComboBox?


I would like that on a TCombobox the only way to change a value is by using the mouse.

If the Items are 1,2 and 3 the user can type 4 and it becomes the value.

i tried to use OnKeyDown but somehow i would like to "avoid key down". How to achieve this?


Solution

  • Set TCombobox.Style into csDropDownList, so user would choose only predefined items