Category / Section
How to change the ForeColor/BackColor of the SuperToolTip?
1 min read
To set the BackColor and ForeColor, you need to assign the appropriate colors to the ToolTip by using the ToolTipInfo object.
Refer to the following code examples.
C#
//Initializes the SuperToolTip private Syncfusion.Windows.Forms.Tools.SuperToolTip superToolTip1 = new Syncfusion.Windows.Forms.Tools.SuperToolTip(); //Initializes the ToolTipInfo private Syncfusion.Windows.Forms.Tools.ToolTipInfo toolTipInfo = new Syncfusion.Windows.Forms.Tools.ToolTipInfo(); //Tool sets the SuperToolTip text toolTipInfo.Body.Text = "Syncfusion SuperToolTip"; //Specifies the back color of the SuperToolTip toolTipInfo.BackColor = System.Drawing.Color.DarkOliveGreen; //Specifies the forecolor of the SuperToolTip toolTipInfo.ForeColor = System.Drawing.Color.Aquamarine; //Assigns the SuperToolTip for buttonAdv1 this.superToolTip1.SetToolTip(this.buttonAdv1, toolTipInfo);
VB
'Initializes the SuperToolTip Private superToolTip1 As New Syncfusion.Windows.Forms.Tools.SuperToolTip() 'Initializes the ToolTipInfo Private toolTipInfo As New Syncfusion.Windows.Forms.Tools.ToolTipInfo() 'Tool sets the SuperToolTip text toolTipInfo.Body.Text = "Syncfusion SuperToolTip" 'Specifies the back color of the SuperToolTip toolTipInfo.BackColor = System.Drawing.Color.DarkOliveGreen 'Specifies the forecolor of the SuperToolTip toolTipInfo.ForeColor = System.Drawing.Color.Aquamarine 'Assigns the SuperToolTip for buttonAdv1 Me.superToolTip1.SetToolTip(Me.buttonAdv1, toolTipInfo)
Figure 1: SuperToolTip with DarkOliveGreen back color.
Figure 2: SuperToolTip with different backcolor.