在鼠标悬停在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 howToolTip
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 aToolTip
text. The usage of it not completely intuitive; one unusual thing is that oneToolTip
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