Search code examples
c#.netwinformstooltiptoolstripbutton

How to disable appearing of ToolTip text over ToolStripButton?


I trying to display own custom ToolTip with image, but the native ToolTip makes all bad. It still appears where it no needed.

I creating ToolStripButton in that way:

ToolStripButton btn = new ToolStripButton();
btn.Text = name;
btn.ToolTipText = null; //I also tried string.Empty, but no luck

What else I can do to disable it?

enter image description here


Solution

  • Try the following setting:

    btn.AutoToolTip = false;
    btn.ToolTipText = string.empty;
    

    The note on the AutoToolTip property:

    Set the AutoToolTip property to false to display custom ToolTipText on a ToolStripItem.