I have an application where I have a product search text field. To implement a predictive text like feature, I hid a combo box behind the text box that populates with the appropriate products. That all works fine and dandy. The problem is the cursor does not show on the form while the combo box is dropped. I can still use the cursor to select the results from the combo box, but it is invisible until I click something on the form.
Asked
Active
Viewed 2,355 times
1
-
I don't believe this. Please post repro code to convince me. – Cody Gray - on strike Apr 06 '11 at 15:02
-
I got this bug on Delphi as well. Just a standard combo and `ComboBox1.DroppedDown:=true;` in `procedure TfrmMain.ComboBox1Change(Sender: TObject);` – Fr0sT Oct 16 '15 at 14:52
3 Answers
1
ComboBox AutoComplete Custom Capabilities
See this accepted answer to this question. Combo box already has an AutoComplete mode. No reason to hide it behind a textbox.

Community
- 1
- 1

Ryan Bennett
- 3,404
- 19
- 32
-
2More importantly, I think, is that the **`TextBox`** control has auto-complete capabilities. At least, that's how I read the question. – Cody Gray - on strike Apr 06 '11 at 15:07
-
Yeah I looked at that but I don't want to have the combo box shown, I want it to look like a regular text box. Do you know of a way to hide the arrow on the combo box? That would work great for me if so. – Nick Apr 06 '11 at 15:13
-
@Cody Gray Holy crap, a text box does have autocomplete. Thanks. And let this be a lesson to me to read the properties... – Nick Apr 06 '11 at 15:14
-
@Nick: Yup, [three different styles to chose from](http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletemode.aspx). My life got much easier when I no longer had to write that code myself each time. – Cody Gray - on strike Apr 06 '11 at 15:17
0
Do you have the combobox dropdown style as DropDownList?
Also why not use the AutoComplete Mode to accomplish predictive text feature

Mike
- 5,918
- 9
- 57
- 94