How To Provide SuperToolTip For NumericUpDownExt Control?
(Views :1308)

SuperToolTipcomponent in VS 2005 is used to provide extended tooltip support for any controls.

We can add this SuperToolTip support for any .Net control, MenuStrip,ToolStrip, Syncfusion controls, ToolStripEx and RibbonTabControl (All Items).

Inorder to add SuperToolTip through code, user should create an instance of Syncfusion.Windows.Forms.Tools.ToolTipInfoas shown below

C#
Syncfusion.Windows.Forms.Tools.ToolTipInfo toolTipInfothroughCode = new Syncfusion.Windows.Forms.Tools.ToolTipInfo();
toolTipInfothroughCode.BackColor = SystemColors.Control;
toolTipInfothroughCode.Body.Text = "SuperToolTip for NumericUpDownExt";
toolTipInfothroughCode.Header.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F,System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
toolTipInfothroughCode.Header.Text = "ToolTip added from code";
toolTipInfothroughCode.Header.TextAlign = ContentAlignment.MiddleCenter;
VB
Dim toolTipInfothroughCode As Syncfusion.Windows.Forms.Tools.ToolTipInfo = New Syncfusion.Windows.Forms.Tools.ToolTipInfo
toolTipInfothroughCode.BackColor = SystemColors.Control
toolTipInfothroughCode.Body.Text = "SuperToolTip for NumericUpDownExt"
toolTipInfothroughCode.Header.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType((0), Byte))
toolTipInfothroughCode.Header.Text = "SuperToolTip "
toolTipInfothroughCode.Header.TextAlign = ContentAlignment.MiddleCenter

Also, Our NumericUpDownExtis derived from the Windows Forms NumericUpDown control and as the NumericUpDown control contains a number of separate controls combined together,assigning the SuperToolTip for the outer control does not pass it to child controls.

Following code sets the SuperToolTip to the NumericUpDownExt control.

C#
foreach ( Control mc in this.numericUpDownExt1.Controls)
{
this.superToolTip1.SetToolTip(mc, toolTipInfothroughCode);
}
VB
For Each mc As Control In Me.NumericUpDownExt1.Controls
Me.SuperToolTip1.SetToolTip(mc, toolTipInfothroughCode)
Next
::adCenter::