I let a supertooltip (from DotNetBar) appear on every control of NumericUpDown. But I only need a supertooltip on the TextBox of NumericUpDown. Here is my current code:
foreach (Control c in NumericUpDown.Controls)
{
NumericUpDownToolTip.SetSuperTooltip(c, NumericUpDownSuperToolTip);
}
//Declarations:
//NumericUpDownToolTip is a SuperToolTip from DotNetBar
//NumericUpDownSuperToolTip is the configuration of the SuperToolTip (for example: the text of the tooltip)
So how do I set the tooltip only on the textbox?
Modify your foreach to be this:
foreach (Control c in NumericUpDown.Controls.OfType<TextBox>())