如何为自定义文本字段引发事件? [英] How do I raise an event for a custom text field?

查看:121
本文介绍了如何为自定义文本字段引发事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





在我的VB.Net表单中,我正在尝试为自定义文本字段创建一个事件(离开事件)。当焦点离开文本框时,我将不得不提升事件。它显示在事件列表中,但在我想要时不会触发,就像离开文本字段一样。请帮帮我。



我的自定义文本框类有此事件:

Hi,

In my VB.Net form, I'm trying to create an event (leave event)for a custom text field. I'll have to raise the event when the focus is leaving the textbox. It displays in the event list but doesnot fire when I want to, like leaving the textfield. Please help me with this.

My custom textbox class has this event:

Public Event TextBoxControl_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs)





我真的非常感谢你的帮助。



谢谢



Raj



I'd really really appreciate your help.

Thanks

Raj

推荐答案

这是您正在使用的自定义控件吗?



如果您有控件源,您可以查找RaiseEvent处理程序并查看它是否正确指向TextBoxControl_Leave事件。



如果什么都不起作用 - 你总是可以使用其他控件的Enter属性来完成你想要实现的目标。
Is this a custom control you are using?

If you have the control source, you can look up the RaiseEvent handler and see if it points correctly to the TextBoxControl_Leave event.

If nothing works - you can always use the Enter property of other controls to accomplish what you are trying to achieve.


这篇关于如何为自定义文本字段引发事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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