简体   繁体   中英

How to avoid insert text from autocomplete list to textBox until press Enter?

I'm coding a textbox that auto suggest when I'm writing, but when autocomplete appear, if I press Down , my textBox1.Text change, therefore it call TextChanged function, and autocomplete list is being update.

I want while I press Down , the text dont change ultil I press Enter . Is any way to fix this issue?

关闭textbox Autocomplete功能

<asp:TextBox Runat="server" ID="Textbox1" autocomplete="off"></asp:TextBox>

Apart from implementing your own autocomplete, such as by overriding OnTextChanged and showing a list, the only options to control the behavior of autocomplete on a WinForms TextBox are given by the AutoCompleteMode property and the enumeration of the same name . See C# AutoComplete for a related question.

Third party text boxes may have more options but I am not aware of any that do.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM