文本框鼠标移动的背景变化 [英] Text box Background Change on Movement of Mouse

查看:74
本文介绍了文本框鼠标移动的背景变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,
当我们专注于任何文本框时,我们都可以将背景颜色更改为详细信息.

私有子TextBox2_GotFocus(ByVal发送者作为对象,ByVal e作为System.EventArgs)处理TextBox2.GotFocus
TextBox2.BackColor = Color.GreenYellow
结束子

现在,如果我有25个以上的文本框,并且想通过鼠标移动来更改文本框的背景,该怎么做.

Dear all,
As we focus on any textbox we can change the background colour as detail under.

Private Sub TextBox2_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.GotFocus
TextBox2.BackColor = Color.GreenYellow
End Sub

Now if I have more than 25 textboxes and I want to change background of the textbox on movement of mouse on that how to do that.

Kindly explain with an example.

推荐答案

创建CSS并执行onmouseover事件.

您可能需要将文本区域创建为ID并进行调用,但这非常简单.
Create a CSS and do an onmouseover event.

You may need to create the textarea as an ID and call that, but it is fairly simple.


这篇关于文本框鼠标移动的背景变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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