NumericUpDown is a nice control... eh

Publish date: November 22, 2006
Tags: .net bugs winforms

NumericUpDown Bug

From the site:

FAQs


NumericUpDown

Print these FAQs

How do I get the Tooltips to be 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 NumericUpDown), tooltips are not shown on those child controls. To workaround this issue, do the following in code:

[C#]

foreach ( Control c in numericUpDown1.Controls )  
tooltip.SetToolTip( c, "mytooltip" );  

[Visual Basic]

Dim c As Control  
For Each c In numericUpDown1.Controls  
tooltip.SetToolTip(c, "mytooltip")  
Next  

Contributed from George Shepherd’s Windows Forms FAQ