如何在mouseleave事件中使datagridview失去焦点 [英] how to unfocus the datagridview in mouseleave event
本文介绍了如何在mouseleave事件中使datagridview失去焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
在鼠标悬停事件中
datagridview1.focus();
hi all
in mousehover event
datagridview1.focus();
how can I unfocus the mouseleave event?
推荐答案
通过将焦点设置为其他元素.
By setting the focus to a different element.
在gridview中鼠标进入事件
in gridview''s mouse enter event
datagridview1.focus();
在gridview的鼠标离开事件中
in gridview''s mouse leave event
textbox1.focus();
祝您编码愉快!
:)
Happy Coding!
:)
我认为您需要的是明确选择,是吗?
I think what you need is clear selection, is it?
dataGridView1.ClearSelection();
这篇关于如何在mouseleave事件中使datagridview失去焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文