Back to Devexpress

BaseLayoutItemOptionsToolTip.AllowHtmlString Property

windowsforms-devexpress-dot-xtralayout-dot-baselayoutitemoptionstooltip.md

latest4.4 KB
Original Source

BaseLayoutItemOptionsToolTip.AllowHtmlString Property

Gets or sets whether HTML formatting tags can be used to format the tooltip’s text.

Namespace : DevExpress.XtraLayout

Assembly : DevExpress.XtraLayout.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public DefaultBoolean AllowHtmlString { get; set; }
vb
<XtraSerializableProperty>
<DefaultValue(DefaultBoolean.Default)>
Public Property AllowHtmlString As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

True if HTML formatting tags can be used to format the tooltip’s text; False if not; Default uses the ToolTipController.AllowHtmlText global setting.

|

Available values:

NameDescriptionReturn 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

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowHtmlString
BaseLayoutItem

.OptionsToolTip .AllowHtmlString

|

Remarks

Use the BaseLayoutItemOptionsToolTip.ToolTip property to provide a tool tip shown when the item’s caption is hovered over with the mouse pointer. The AllowHtmlString property enables HTML formatting in the tooltip. If this property is set to Default , the feature is controlled by the ToolTipController.AllowHtmlText global setting.

The code below enables HTML tags for a particular item, and specifies a formatted tool tip. For the complete list of supported tags, see HTML Text Formatting.

csharp
layoutControlGroup2.OptionsToolTip.AllowHtmlString = DevExpress.Utils.DefaultBoolean.True;
layoutControlGroup2.OptionsToolTip.ToolTip = "Enter a <b>valid</b> address";
vb
layoutControlGroup2.OptionsToolTip.AllowHtmlString = DevExpress.Utils.DefaultBoolean.True
layoutControlGroup2.OptionsToolTip.ToolTip = "Enter a <b>valid</b> address"

The result is shown below.

You can also override the HTML formatting setting for a particular item when handling the ToolTipController.BeforeShow event. For this purpose, use the ToolTipControllerShowEventArgs.AllowHtmlText property of the ToolTipControllerShowEventArgs object passed as a parameter to the event handler.

See Also

ToolTipController.AllowHtmlText

ToolTipControllerShowEventArgs.AllowHtmlText

ToolTip

IconAllowHtmlString

HTML-inspired Text Formatting

BaseLayoutItemOptionsToolTip Class

BaseLayoutItemOptionsToolTip Members

DevExpress.XtraLayout Namespace