动态工具提示 [英] Dynamic tooltip

查看:115
本文介绍了动态工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个为datagridview单元定义的工具提示.当我将鼠标悬停在单元格上时,它会显示.但是,我想在该工具提示显示时更新其内容.我怎样才能最好地做到这一点?有工具提示显示事件吗?在这方面,mousehover事件似乎并没有真正起作用.

感谢

I have a tooltip defined for a datagridview cell. It displays when I hover the mouse over the cell. I''d like however to update the contents of that tooltip when it displays. How can I best do that? Is there a tooltip display event? The mousehover event doesn''t seem to really work in this regard.

Thanks

推荐答案

如果我明白了您正在谈论的事情,没有一个您正在谈论的事件.

您要做的是处理DGV的CellMouseHover以及可能的CellMouseLeave事件,以询问鼠标所在的单元格并在鼠标移动时设置ToolTip的Text属性.

If I get what you''re talking about doing, there isn''t an event like you''re talking about.

What you''d have to do is handle the DGV''s CellMouseHover and probably CellMouseLeave events to interrogate the cell the mouse is over and set the ToolTip''s Text property as the mouse moves.


这篇关于动态工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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