处理类中文本框上的mouseclick事件 [英] handling mouseclick event on textbox in class

查看:105
本文介绍了处理类中文本框上的mouseclick事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友

我想创建扩展文本框的类文件.
并且还想处理文本框上的鼠标单击事件
那怎么办呢?

在此先感谢

解决方案

1)在设计视图中的设计器中显示您的课程
2)在属性"窗格中,按事件"按钮(看起来像个闪电).
3)双击Click事件.

这将创建一个处理程序,将其连接起来,并带您到事件处理程序方法的代码.


您必须向扩展文本框类添加自定义事件..

通过下面提到的链接..

http://stackoverflow. com/questions/1768633/how-can-i-add-mouse-click-event-to-web-textbox-in-c-sharp [ 解决方案

1) Bring up your class in the designer, in Design View
2) In the Properties pane, press the Events button (it looks like a lightening bolt)
3) Double click the Click event.

That will create a handler, hook it all up, and take you to the code for the event handler method.


You have to add a custom event to extended textbox class..

Go through below mentioned link ..

http://stackoverflow.com/questions/1768633/how-can-i-add-mouse-click-event-to-web-textbox-in-c-sharp[^]


这篇关于处理类中文本框上的mouseclick事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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