Answer the question
In order to leave comments, you need to log in
Is it possible to prevent non-existent Items from being selected in a ComboBox, but at the same time leave the ability to enter Items and not just select them?
Hello. I have in ComboBox, and it has a lot of Items, because of this it is inconvenient to select them. I want to make it possible to enter Items (so that there is auto-completion with the ability to select an existing Item), but at the same time prohibit non-existent Items (after all, you can enter anything - this is not a choice, but an input). How to do it?
Answer the question
In order to leave comments, you need to log in
TComboBox.Style
csDropDownList : defines a drop-down list with no edit box; the user cannot enter text manually. All items are strings of the same height.
And jumps to the first character.
If you need to enter more than one character, but only select from a list, don't let it exit with TComboBox
if ComboBox1.ItemIndex < 0
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question