C#TextBox按下回车键触发的事件名称是?

来源:百度知道 编辑:UC知道 时间:2024/05/22 13:53:19
C#TextBox按下回车键触发的事件名称是?

// 事件

// this.textBox1.KeyPress += new 

System.Windows.Forms.KeyPressEventHandler(this.TextBox1_Press);


private void TextBox1_Press(object sender, KeyPressEventArgs e)

{

if (e.KeyChar == 13)

{

textBox1.Text = "AAA";

}

}

扩展资料:

相关属性

1、TextBox.AutoCompleteCustomSource 属性

获取或设置当 TextBox.AutoCompleteSource 属性设置为 [CustomSource] 时要使用的自定义 T:System.Collections.Spe