?
=?ISO-8859-2?Q?Marcin_Grz=EAbski?=
Hi,
If you set tooltip to any UserControl, then it will be
displayed only over that control's background.
To make tooltip display all over subcontrols of your usercontrol
then you can do it by a simple trick:
/// <summary>
/// Set tooltip's caption to all child controls of main control.
/// </summary>
/// <param name="toolTip">ToolTip component.</param>
/// <param name="control">Main control.</param>
/// <param name="caption">A caption to set.</param>
public static void SetToolTipByRecurence(ToolTip toolTip
, Control control
, string caption) {
foreach(Control childControl in control.Controls) {
toolTip.SetToolTip(childControl
, caption);
SetToolTipByRecurence(toolTip
, childControl
, caption);
}
}
But i cannot find a way to display tooltip over
disabled control
Cheers!
Marcin
If you set tooltip to any UserControl, then it will be
displayed only over that control's background.
To make tooltip display all over subcontrols of your usercontrol
then you can do it by a simple trick:
/// <summary>
/// Set tooltip's caption to all child controls of main control.
/// </summary>
/// <param name="toolTip">ToolTip component.</param>
/// <param name="control">Main control.</param>
/// <param name="caption">A caption to set.</param>
public static void SetToolTipByRecurence(ToolTip toolTip
, Control control
, string caption) {
foreach(Control childControl in control.Controls) {
toolTip.SetToolTip(childControl
, caption);
SetToolTipByRecurence(toolTip
, childControl
, caption);
}
}
But i cannot find a way to display tooltip over
disabled control
Cheers!
Marcin