在鼠标悬停在datagrid上的工具提示中显示信息 [英] Display info in tooltip on mouse-hover over datagrid

查看:83
本文介绍了在鼠标悬停在datagrid上的工具提示中显示信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当鼠标悬停在特定行上时,我必须在datagrid的工具提示中动态显示一些细节. 我没有使用datagridview.
当单击网格的特定行作为所需行的焦点时,我只能获取数据.但是我需要同样的东西,而无需单击网格,而只需将鼠标指针移到网格上即可.

请提出解决方案.

注意:我已经找到了ASP.Net over net的解决方案,但没有找到WinForms ..的解决方案,而我的项目仅是WinForms.


问候,

honeyashu

Hi,
I have to show few details in datagrid''s tooltip dynamically as the mouse hover on the particular row. I am not using datagridview.
I am getting the dataonly when clicking on the particular row of the grid as focus of the desired row get sets. But i need the same without clicking on the grid and just on mouse pointer over it.

Please suggest if have any solution.

Note: I had found solutions for ASP.Net over net but not for WinForms.. and my project is of WinForms only.


Regards,

honeyashu

推荐答案

这正是ToolTip的设计方式—可以在鼠标悬停时使用;和控制无关紧要.但是,您可以使用特定于控件的其他事件来修改ToolTip文本.它的用法并不完全直观;一个不寻常的事情是,一个ToolTip实例可用于多个控件.

此MSDM页面的代码示例足以启动:
http://msdn.microsoft.com/en-us/library/system. windows.forms.tooltip.aspx [ ^ ].

—SA
This is exactly how ToolTip is designed — it works on mouse hover; and a control does not matter. However, you can use additional events specific to the control to modify a ToolTip text. The usage of it not completely intuitive; one unusual thing is that one ToolTip instance works for multiple control.

The code sample of this MSDM page is good enough to start:
http://msdn.microsoft.com/en-us/library/system.windows.forms.tooltip.aspx[^].

—SA


这篇关于在鼠标悬停在datagrid上的工具提示中显示信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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