Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 537
Kosmo零 Avatar asked Oct 01 '14 18:10

Kosmo零


People also ask

What is a Tooltip control?

A tooltip control can be either active or inactive. When it is active, the tooltip text appears when the mouse pointer is on a tool. When it is inactive, the tooltip text does not appear, even if the pointer is on a tool. The TTM_ACTIVATE message activates and deactivates a tooltip control.


2 Answers

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.

like image 114
LarsTech Avatar answered Oct 01 '22 07:10

LarsTech


You can also disable all tooltips just go to toolstrip properties and then select False

enter image description here

like image 24
Ramgy Borja Avatar answered Oct 01 '22 09:10

Ramgy Borja