CodePudding user response:
Put a listbox below the input box, you will be prompted to content in,Began to hide the listbox, input display
CodePudding user response:
See Microsoft's AutoCompleteCustomSource reference:https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.textbox.autocompletecustomsource
Var source=new AutoCompleteStringCollection ();
Source. AddRange (new string []
{
"January",
"February",
"March,"
"Research",
"May",
"June",
"Out,"
"August",
"September",
"October",
"November",
"Another awarding
"});
This. The textBox1. AutoCompleteSource=AutoCompleteSource. CustomSource;
This. The textBox1. AutoCompleteCustomSource=source;
This. The textBox1. AutoCompleteMode=AutoCompleteMode. SuggestAppend;
CodePudding user response:
Before I also tried the idea, and then I found that my brain is stupid, only through listCodePudding user response:
With WPF easier...CodePudding user response: