如何在winform中做出如网页中tag的鼠标提示效果?????

superfishmanweb 2005-10-10 12:04:11
rt我是用在datagrid上面的。
...全文
254 16 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
97ce_twinkle 2005-10-18
  • 打赏
  • 举报
回复
下面是MSDN里的例子,不知道够用吗?
// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
private void Form1_Load(object sender, System.EventArgs e)
{
// Create the ToolTip and associate with the Form container.
ToolTip toolTip1 = new ToolTip();

// Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = true;

--从工具箱把toolTip控件拖进去就已经有上面的代码了,除了showalways=false

然后你在要它显示的地方就加 toolTip1.SetToolTip(yourDataGrid, "提示语句");
不需要它显示时就toolTip1.RemoveAll();



}
JadyWang 2005-10-18
  • 打赏
  • 举报
回复
下面是MSDN里的例子,不知道够用吗?
// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
private void Form1_Load(object sender, System.EventArgs e)
{
// Create the ToolTip and associate with the Form container.
ToolTip toolTip1 = new ToolTip();

// Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = true;

// Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(this.button1, "My button1");
toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
}
chinasf 2005-10-18
  • 打赏
  • 举报
回复
tooltips控件
chinasf 2005-10-18
  • 打赏
  • 举报
回复
tooltips
xiaomatian 2005-10-18
  • 打赏
  • 举报
回复
普通控件好象有这个属性的,不过没注意看过.如果楼主实在找不到这个属性的话可以给控件加鼠标移动事件嘛.
superfishmanweb 2005-10-18
  • 打赏
  • 举报
回复
up
Ellisontao 2005-10-13
  • 打赏
  • 举报
回复
顶!
superfishmanweb 2005-10-13
  • 打赏
  • 举报
回复
自己再顶顶。
superfishmanweb 2005-10-12
  • 打赏
  • 举报
回复
superfishmanweb 2005-10-11
  • 打赏
  • 举报
回复
大大们,我问的是winform,为何全都是asp.net了。
superfishmanweb 2005-10-11
  • 打赏
  • 举报
回复
?
mba9001 2005-10-10
  • 打赏
  • 举报
回复
use "title"
eg.
button1.Attributes["title"]="sfsfsf";
bobo068 2005-10-10
  • 打赏
  • 举报
回复
对,tooltips。

不过需要一个一个设置,很烦,估计也相当耗费资源。

一般选择放弃。

===============================

msn:bobo068@hotmail.com
lonelyfatboy 2005-10-10
  • 打赏
  • 举报
回复
顶一下!
zhy0101 2005-10-10
  • 打赏
  • 举报
回复
tooltips
superfishmanweb 2005-10-10
  • 打赏
  • 举报
回复
ding

111,094

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧