首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

Wimfrom textedit下的Tooltip 控件有关问题

2012-10-19 
Wimfrom textedit上的Tooltip 控件问题我的tooltip代码如下:private void textEdit1_MouseEnter(object se

Wimfrom textedit上的Tooltip 控件问题
我的tooltip代码如下:
  private void textEdit1_MouseEnter(object sender, EventArgs e)
  {

  string text1 = textEdit1.Text;
  ToolTip toolTip1 = new ToolTip();
  toolTip1.AutoPopDelay = 5000;
  toolTip1.InitialDelay = 500;
  toolTip1.ReshowDelay = 100;
  toolTip1.ShowAlways = true;
  toolTip1.SetToolTip(this.textEdit1, text1);
  }
但是在鼠标指向textEdit上时,鼠标在textEdit框边缘为鼠标状可以显示,但是鼠标在textEdit框中间显示光标状,就没有tooltip了,我怎么让鼠标移动到textEdit中一直是鼠标状而且有tooltip提示呢?

[解决办法]
ToolTip toolTip1 = new ToolTip();
你用一个全局的toolTip试试,不要频繁new

热点排行