DataGridView的工具提示 [英] ToolTip for DataGridView

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

问题描述


我在Windows窗体上有一个DataGridView,当鼠标悬停在其上时,我想为其显示工具提示.这似乎不起作用.此表单上其他控件(例如标签,文本框等)的工具提示会按预期显示.为什么?

关于,


G.Sig

Hi,
I have a DataGridView on a Windows Form for which I would like to display a tooltip when the mouse hovers over it.  This does not seem to work.  Tooltips for other controls (e.g. labels, textboxes etc.) on this form show up as expected.  Why is that?

Regards,


G.Sig

推荐答案

您好,

尽管处理方式可能有些不同,但是您可以通过魅力实现它.

尝试类似的方法:

将以下代码放入表单的加载事件->
Hi,

You can achieve that with charm though the way to handle that may be a bit different.

Try something like:

Put the following code in the Form's Load event-->
        private void frmTest_Load(object sender, EventArgs e)
        {
               .......Other Code.......
               dataGridView1[1, 1].ToolTipText = "Test Tool Tip Text on cell 1,1";
        }

因此,您可以按照自己喜欢的任何方式演奏.

Accordingly, you can play in whichever way you like prefer.


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

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