[]
InputPanel provides a ToolTip Editor which lets you create rich tooltips for input components. This topic describes how you can use this editor to create a rich tooltip for the InputButton component at design time and through code.
type=note
Note: You can also style title, body text and subtitle texts using the quick toolbar given on the top of Office tab.
<font color="blue"></font>
tag to change the text color to blue. Also, we have enclosed a part of subtitle in <a href = "[developer.mescius.com](http://developer.mescius.com)"></a>
tags to create a hyperlink.Create an InputButton and add it to the InputPanel.
Set the Text property of InputButton, say "ToolTip Tutorial". csharp
// Create an instance of InputButton to show tooltip on it.
InputButton btn = new InputButton();
btn.Text = "ToolTip Tutorial";
// Add it to InputPanel.
c1InputPanel1.Items.Add(btn);
vbnet
' Create an instance of InputButton to show tooltip on it.
Dim btn As InputButton = New InputButton()
btn.Text = "ToolTip Tutorial"
' Add it to InputPanel
c1InputPanel1.Items.Add(btn)
Set the ToolTipText property of the button. You can also use the HTML string to create a tooltip with title, subtitles etc. as shown in the code below. csharp
btn.ToolTipText = @"<table>
<tr>
<td><parm><img src='res://help1.jpg'></parm></td>
<td><b><parm>Tooltip Tutorial</parm></b></td>
</tr></table>
<parm><hr noshade size=1 style='margin:2' color=#ff4500></parm>
<div style='margin:1 12'><parm>
<font color = 'blue'>This tutorial will help you: </font><br>
<ol><li> Learn how to set a tooltip.</li><li>Learn how to style the tooltip.</li></ol>
</parm></div>
<parm><hr noshade size=1 style='margin:2' color =#ff4500></parm>
<table><tr>
<td><parm><img src ='res://search1.png'></parm></td> +
<td><b><parm>Look for more tips <i><a href='http://developer.mescius.com>here</a></i>.</parm></b></td>
</tr></table>";
vbnet
btn.ToolTipText = @"<table>
<tr>
<td><parm><img src='res://help1.jpg'></parm></td>
<td><b><parm>Tooltip Tutorial</parm></b></td>
</tr></table>
<parm><hr noshade size=1 style='margin:2' color=#ff4500></parm>
<div style='margin:1 12'><parm>
<font color = 'blue'>This tutorial will help you: </font><br>
<ol><li> Learn how to set a tooltip.</li><li>Learn how to style the tooltip.</li></ol>
</parm></div>
<parm><hr noshade size=1 style='margin:2' color =#ff4500></parm>
<table><tr>
<td><parm><img src ='res://search1.png'></parm></td> +
<td><b><parm>Look for more tips <i><a href='http://developer.mescius.com>here</a></i>.</parm></b></td>
</tr></table>"
Customize appearance of the tooltip by using various properties of the ToolTipSettings class. csharp
// Customize the tooltip
c1InputPanel1.ToolTipSettings.RoundedCorners = true;
c1InputPanel1.ToolTipSettings.IsBalloon = true;
c1InputPanel1.ToolTipSettings.Border = true;
c1InputPanel1.ToolTipSettings.BorderColor = Color.OrangeRed;
c1InputPanel1.ToolTipSettings.Opacity = 80;
vbnet
' Customize the tooltip
c1InputPanel1.ToolTipSettings.RoundedCorners = True
c1InputPanel1.ToolTipSettings.IsBalloon = True
c1InputPanel1.ToolTipSettings.Border = True
c1InputPanel1.ToolTipSettings.BorderColor = Color.OrangeRed
c1InputPanel1.ToolTipSettings.Opacity = 80