Chinaunix首页 | 论坛 | 博客
  • 博客访问: 12406633
  • 博文数量: 1293
  • 博客积分: 13501
  • 博客等级: 上将
  • 技术积分: 17974
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-08 18:11
文章分类

全部博文(1293)

文章存档

2019年(1)

2018年(1)

2016年(118)

2015年(257)

2014年(128)

2013年(222)

2012年(229)

2011年(337)

分类: 嵌入式

2012-09-14 16:23:46

ToolTip 类

   可表示一个长方形的小弹出窗口,该窗口在用户将指针悬停在一个控件上时显示有关该控件用途的简短说明。


代码片段:


  1. private void SetRadioButtonToolTip()
  2. {
  3.     // Create the ToolTip and associate with the Form container.
  4.     ToolTip toolTip1 = new ToolTip();

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

  11.     // Set up the ToolTip text for the Button and Checkbox.
  12.     toolTip1.SetToolTip(this.radioButton4, "光标");
  13.     toolTip1.SetToolTip(this.radioButton1, "标签");
  14.     toolTip1.SetToolTip(this.radioButton2, "面板");
  15.     toolTip1.SetToolTip(this.radioButton3, "按钮");
  16. }


执行效果图:

image

阅读(4550) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~