C#中textbox的leave事件怎么写?

来源:百度知道 编辑:UC知道 时间:2024/07/02 08:29:18
比如textchanged如下,
protected void TextBox1_TextChanged(object sender, EventArgs e)
{ }

求教leave事件代码怎么写?...

选择哪个textbox,在属性栏里点击一下那个“闪电”按钮(事件)

然后找到鼠标——MouseLeave在右边的框中双击一下就会自动添加事件了。

this.textBox1.Leave += new System.EventHandler(this.textBox1_Leave);

private void textBox1_Leave(object sender, EventArgs e)
{

}