How to show the SuperToolTip through Code?
(Views :1282)

The ToolTip can be shown through Code by using the SetToolTip() method of the SuperToolTip Control. A ToolTipInfo object needs to be created.

Here is the Code snippet for the same.
C#
Syncfusion.Windows.Forms.Tools.ToolTipInfo myToolTipInfo = new Syncfusion.Windows.Forms.Tools.ToolTipInfo();
 toolTipInfothroughCode.BackColor = SystemColors.Control;
toolTipInfothroughCode.Body.Text = "Create a ToolTipInfo and assign \r\n to the control through SetToolTip";
    myToolTipInfo.Header.Image = new Bitmap("..\\..\\pic.png");
myToolTipInfo.Header.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
myToolTipInfo.Header.Text = "ToolTip added from code";
myToolTipInfo.Header.TextAlign = ContentAlignment.MiddleCenter;
 myToolTipInfo.BorderColor = Color.FromArgb(200, 212, 53);
 this.superToolTip1.SetToolTip(this.listBox1, myToolTipInfo);
VB
Private myToolTipInfo As Syncfusion.Windows.Forms.Tools.ToolTipInfo = New Syncfusion.Windows.Forms.Tools.ToolTipInfo()
 toolTipInfothroughCode.BackColor = SystemColors.Control
toolTipInfothroughCode.Body.Text = "Create a ToolTipInfo and assign " & Constants.vbCrLf & " to the control through SetToolTip"
 myToolTipInfo.Header.Image = New Bitmap("..\..\pic.png")
myToolTipInfo.Header.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (CByte(0)))
myToolTipInfo.Header.Text = "ToolTip added from code"
myToolTipInfo.Header.TextAlign = ContentAlignment.MiddleCenter
 myToolTipInfo.BorderColor = Color.FromArgb(200, 212, 53)
 Me.superToolTip1.SetToolTip(Me.listBox1, myToolTipInfo)
::adCenter::