日期:2014-05-17  浏览次数:20720 次

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