ToolTip and UserControl

  • Thread starter Thread starter Samuel
  • Start date Start date
S

Samuel

Hello:

When you put an UserControl on a form and you assign a ToolTip to it, if the
UserControl contains other controls (the 99% of the times), the tooltip is
not displayed when the cursor is over these other controls.

Is there a way to solve this?

Thank you.

Samuel.
 
I have a UserControl, I add tooltip to the control, and a few buttons. I
assigned tooltip to buttons. They all work well.

You might want to look at other reasons.
 
Guogang said:
I have a UserControl, I add tooltip to the control, and a few buttons. I
assigned tooltip to buttons. They all work well.

You assing more than one tooltip?

Sorry, I didn't make myself understood.

Create an UserControl (UserControl1 for example) with a button in the
middle.

Try to create an instance of your UserControl1 (in a form, normally with the
designer) and assign a tooltip to it (to the instance of your UserControl1).

Then run the program: if you move the mouse over the zones (the sides) of
your UserControl1, where there isn't the button, in fact there is nothing,
the tooltip will appear; but when you put the cursor over the button, it
dissapears, although the cursor is still "inside" your UserControl1 (because
the button is part of your usercontrol), and so, in my opinion, the tooltip
should stay visible, but it doesn't.

Otherwise the tooltips would be useless in conjunction with UserControls,
wouldn't it? Because almost all UserControls are populated with other
controls, and the tooltip for a UserControl should be visible when the
cursor is over any part of the UserControl.

Well I hope this time I have explained it correctly, I'm not english and it
isn't easy to me.
Regards.
 
assign a tooltip to it (to the instance of your UserControl1).

In addition to assigning the tooltip to your UserControl, also assign it to
the button (and any other control over which you want to see a tip). One
ToolTip1 control can display tips over many other controls.

If you do this from within the designer in VisStu (drop the tooltip control
on your user control), a new property (tooltip on ToolTip1) for each control
on the design surface.

===============================
Clay Burch, .NET MVP

Visit www.syncfusion.com for the coolest tools
 
Back
Top