windowsforms-devexpress-dot-utils-dot-tooltipitem.md
Gets or sets whether HTML formatting is allowed for the item’s text (ToolTipItem.Text).
Namespace : DevExpress.Utils
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean AllowHtmlText { get; set; }
<DefaultValue(DefaultBoolean.Default)>
<DXCategory("Behavior")>
Public Property AllowHtmlText As DefaultBoolean
| Type | Default | Description |
|---|---|---|
| DefaultBoolean | Default |
A DefaultBoolean value that specifies whether HTML formatting is allowed in the tooltip.
|
Available values:
| Name | Description | Return Value |
|---|---|---|
| True |
The value is true.
|
0
| | False |
The value is false.
|
1
| | Default |
The value is specified by a global option or a higher-level object.
|
2
|
Use the following properties to enable HTML tags in tooltips:
ToolTipController property.ToolTipItem.AllowHtmlText — overrides the previous setting for a particular item (area) in a super tooltip. To specify the item’s content, use the ToolTipItem.Text property.This example demonstrates how to enable HTML tags for the SimpleButton and TextEdit controls.
toolTipController1.AllowHtmlText = true;
simpleButton1.ToolTipController = toolTipController1;
textEdit1.ToolTipController = toolTipController1;
simpleButton1.ToolTip = "I\'ve agree to the <href=www.devexpress.com>terms and conditions</href>.
I want to <b>subscribe</b> to the newsletter.";
textEdit1.ToolTip = "Enter your <b>valid</b> e-mail address.";
//...
private void toolTipController1_HyperlinkClick(object sender, HyperlinkClickEventArgs e) {
// Handle a click on a hyperlink displayed in a tooltip.
}
toolTipController1.AllowHtmlText = True
simpleButton1.ToolTipController = toolTipController1
textEdit1.ToolTipController = toolTipController1
simpleButton1.ToolTip = "I've agree to the <href=www.devexpress.com>terms and conditions</href>.
I want to <b>subscribe</b> to the newsletter."
textEdit1.ToolTip = "Enter your <b>valid</b> e-mail address."
' ...
Private Sub toolTipController1_HyperlinkClick(ByVal sender As Object, ByVal e As HyperlinkClickEventArgs)
' Handle a click on a hyperlink displayed in a tooltip.
End Sub
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AllowHtmlText property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-scheduler-display-custom-tooltips/VB/Form1.vb#L31
ttiBody.Image = SystemIcons.Information.ToBitmap()
ttiFooter.AllowHtmlText = DefaultBoolean.True
ttiFooter.Text = "<b>www.devexpress.com</b>"
See Also