Serialcoder en Français Serialcoder in English
TEL : +33 (0)9 72 13 15 17

Windows Forms FAQ resources

14. Windows Forms Patterns

14.3 Why are the Tooltips not being shown on a NumericUpDown control?


This is because of a bug in the .net framework. When tooltips are set on a control that hosts other controls within it (like the numeric updown), tooltips are not shown on those child controls. To workaround this issue, do the following in code:


[C#]
foreach(Control c in this.numericUpDown1.Controls)
{
     this.tooltip.SetToolTip(c, "mytooltip");
}



[VB.Net]
Dim c As Control
For Each c In Me.numericUpDown1.Controls
     Me.tooltip.SetToolTip(c, "mytooltip")
Next