文本框离开&进入 [英] textbox leave & enter

查看:104
本文介绍了文本框离开&进入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的专家,

我的文本框中有两个事件:1.按键和2.离开. 离开"事件与另一个文本框的事件关联.我想为我的离开"事件附加一个处理程序.

请指导我们.


--- Anil Kumar Bhakta

Dear Experts,

My textbox having two events 1.Keypress & 2.Leave. The "leave" event is attached with another textbox''s event. I want to attach one more handler to my "leave" event.

Kindly guide us.


--- Anil Kumar Bhakta

推荐答案

尝试:
myTextBox.Leave += new EventHandler(myTextBox_Leave);

每次执行此操作时,您将添加一个事件处理程序...

Each time you execute this, you will add an event handler...


您可以将多个处理程序附加到一个事件.
但是,不能保证执行顺序(尽管假定它们将按照注册顺序执行).

类似于之前发布的内容(多个处理程序)-

You can attach multiple handlers to an event.
There is no guarantee on the order of execution however (although it is assumed that they will fire in the order of registration).

Similar to what was posted before (multiple handlers) -

myTextBox.Leave += new EventHandler(myTextBox_Leave1);
myTextBox.Leave += new EventHandler(myTextBox_Leave2);


这篇关于文本框离开&进入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆