Open In App

How to set the title of the ToolTip in C#?

In Windows Forms, the ToolTip represents a tiny pop-up box which appears when you place your pointer or cursor on the control and the purpose of this control is it provides a brief description about the control present in the windows form. In ToolTip, you are allowed to set the title in the ToolTip window which displays on the screen using ToolTipTitle Property.
The title is always written above the standard text and in bold letters. The maximum length of the title is 99 characters. If you try to enter more than 99 characters, then the title will not be displayed on the screen. You can set this property in two different ways:

1. Design-Time: It is the easiest way to set the value of the ToolTipTitle property as shown in the following steps:



2. Run-Time: It is a little bit trickier than the above method. In this method, you can set the ToolTipTitle property of ToolTip programmatically with the help of given syntax:



public string ToolTipTitle { get; set; }

Here, the value of this property is of System.String type. And the string represents the title of the ToolTip window. The following steps show how to set the ToolTipTitle property of the ToolTip dynamically:


Article Tags :
C#