Just hit this problem myself today, and came up with this rather simple solution.
Add the following source file to your codebase somewhere (I put it in a file ToolTipEx.cs)
namespace System.Windows.Forms
{
public static class ToolTipEx
{
private static void SetTipRecurse(ToolTip toolTip, Control control, string tip)
{
toolTip.SetToolTip(control, tip);
foreach (Control child in control.Controls)
SetTipRecurse(toolTip, child, tip);
}
public static void SetTooltip(this ToolTip toolTip, UserControl control, string tip)
{
SetTipRecurse(toolTip, control, tip);
}
}
}
If it is in another DLL, make sure the DLL is referenced.
Then all you have to do is make the normal call to toolTip.SetToolTip(myControl, "some tip"); and the compiler will take care of the rest for you.
Because the function essentially extends the ToolTip.SetToolTip() method to one having the signature
ToolTip(UserControl control, string tip);
which is higher up in the hierachy than the original
ToolTip(Control control, string tip);
When we are dealing with a UserControl, it will be called instead of the original.
The new method does a simple recursive call to give all sub controls then same tool tip as the parent control.
This code assumes that the UserControl will not have other controls added to it after the call to SetToolTip is made.