Home > Net >  Using Winform
Using Winform

Time:10-07

Using the TextBox Winform achieve similar to Google and baidu input prompt functions

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 list A lot of filler text, or traverse is to create a local text

CodePudding user response:

With WPF easier...

CodePudding user response:

reference 4 floor uncle tis response:
with WPF easier...
how WPF is done?
  •  Tags:  
  • C#
  • Related