ToolTips

  • Thread starter =?ISO-8859-2?Q?Marcin_Grz=EAbski?=
  • Start date
?

=?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
 
C

cristiank

Hi All,

Does anyone know if and how can someone add tooltips for controls contained
in an UserControl ?

I see that even if the control has this property, it is not working. The
usercontrol is somehow blocking the appearence of the tooltip.

And, is there any way I can show the tooltip, even if the control is
disabled?

Any advice is appreciated! Thanks in advance!
 
C

cristiank

Thanks a lot, that solved my first dilemma, now I'm trying to make the
tooltips show even if the control is disabled.

I apreciate any advice you may have.

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top