473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ToolTips

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!
Nov 16 '05 #1
2 3243
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
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!

Nov 16 '05 #2
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.

"Marcin Grzębski" <mg*******@taxussi.no.com.spam.pl> wrote in message
news:cc**********@nemesis.news.tpi.pl...
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
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!

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: shraddha | last post by:
Hi I want to implement dynamic interactive tooltips in java so that the user can expand / collapse them. Also, if there are hyperlinks in the tooltip text, the user should be able to follow up...
0
by: Bonna | last post by:
Hi, I've set up a helpsystem for my application using html help 1.x and the dotnet HelpProvider object. It's annoying that that you have to fill in the tooltips yourself (for providing help on...
1
by: David Ei | last post by:
I'm working on a C# Windows Forms application that is leaking memory. I've been using the SciTech NetMem Profiler 2 (A really great tool, BTW) to track down leaks. I've found one related to...
3
by: Wayne | last post by:
Is anybody aware of other software conflicting with Access and disabling the tool tips. I've had this problem in the past and now have it again after rebuilding my desktop and notebook. Both fail...
1
by: Wayne Aprato | last post by:
Tooltips in Access have not worked on my machine for a long time despite several reinstalls of the operating system and applications at fairly regular intervals. I have finally pinned down the...
4
by: Cesario | last post by:
I'm trying to display formatted multi-line text in tooltips. It seems that the newline character works fine whereas the 'tab' character is causing problems and can't display properly. More...
4
by: Jeff Beem | last post by:
I have a class that inherits from TreeView. The treeview has tooltips for the nodes but they're showing up behind the form. Has anyone seen this? Are there any known fixes? Thanks in advance,...
21
by: PlainDave | last post by:
Hi, Is there a way to make windows tooltips stay up longer than the default 5 seconds using CSS in a web page? I'd prefer to have it stay visible as long as the mouse is over the "whatever." The...
1
by: Robert Smith | last post by:
Hello, I have a Tree that contains tooltips, however when I right click on a node of the tree the context menu covers up the tooltips and it looks rather unprofessional. I wish to hide the...
1
by: TyBreaker | last post by:
I have a simple form with a toolstrip on it and some toolstrip buttons. Tooltips work fine. But then I use the ShAppBarMessage API call to register the form as an Application Desktop Toolbar. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.