TextBox autocomplete and default buttons

前端 未结 4 513
Happy的楠姐
Happy的楠姐 2020-12-18 06:35

I have a .NET TextBox with AutoComplete feature on the form. The form has also AcceptButton and CancelButton defined. If I try to commit a suggestion with Enter key or close

4条回答
  •  孤城傲影
    2020-12-18 06:49

    Do not assign AcceptButton and CancelButton form properties. Set DialogResult in the buttons OnClick event.

提交回复
热议问题