Parameters
- control
- The Control to associate the tooltip text with.
- text
- The tooltip text to display when the mouse cursor is over the control.
In addition to specifying the tooltip text to display for a control, you can also use this method to modify the tooltip text for a control. Calling the SetToolTip method more than once for a given control does not specify multiple tooltip text to display for a control but instead changes the current tooltip text for the control.
To determine the tooltip text that is associated with a control at run time, you can use the GetToolTip(Control) method.
C1SuperTooltip can display HTML text, including cascading style sheets, lists, tables, and images. To include images in your tooltips, use an <img> tag as usual, for example:
<img src='[resourcename]'/>
where [resourcename]
is the name of an embedded resource that contains the image. The second example below illustrates this.
_C1SuperTooltip1.SetToolTip(this.listBox1, "This is a tip <b>with bold</b> text in it<br>it is also multi-line...");
_C1SuperTooltip1.SetToolTip(richTextBox1,
@"<table><tr>
<td><img src='tips.gif'/></td>
<td>This is a multiline<br>tooltip<br><b>associated
</b><br>with the rich text box...</td>
</tr></table>");
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2