Windows Forms ToolTip will not re-appear after first use

后端 未结 9 1341
借酒劲吻你
借酒劲吻你 2020-12-03 13:42

I have a Windows Forms C# application where I would like to use a tooltip on one of the text boxes. I initialize the tool-tip in the constructor of the Form class, and it wo

9条回答
  •  伪装坚强ぢ
    2020-12-03 14:09

    System.Windows.Forms.ToolTip ToolTip1 = new System.Windows.Forms.ToolTip();
    
    private void textBox_MouseHover(object sender, EventArgs e)
    {
        ToolTip1.Show("YOUR TEXT", textBox);
    }
    
    private void textBox_MouseLeave(object sender, EventArgs e)
    {
        ToolTip1.Active = false;
        ToolTip1.Active = true;
    }
    

提交回复
热议问题