Back to Devexpress

BaseListBoxControl.AllowHtmlDraw Property

windowsforms-devexpress-dot-xtraeditors-dot-baselistboxcontrol.md

latest3.2 KB
Original Source

BaseListBoxControl.AllowHtmlDraw Property

Gets or sets whether HTML tags can be used to format the text of the control’s items.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean AllowHtmlDraw { get; set; }
vb
<DefaultValue(DefaultBoolean.Default)>
<DXCategory("Behavior")>
Public Property AllowHtmlDraw As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

A DefaultBoolean value that specifies whether HTML tags can be used to format the text of the control’s items.

|

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

|

Remarks

If the AllowHtmlDraw property is set to True , you can use HTML tags to format the text of the control’s items. The control’s items are accessible via the Items collection (see ListBoxControl.Items and BaseCheckedListBoxControl.Items).

For detailed information, see HTML Text Formatting.

Example

The following example adds items to a CheckedListBoxControl and formats their display text using HTML tags.

csharp
checkedListBoxControl1.Items.AddRange(new string[] { "<b>bold</b> text", "<i>italic</i>", "<u>underline</u>" });
checkedListBoxControl1.AllowHtmlDraw = DevExpress.Utils.DefaultBoolean.True;
vb
checkedListBoxControl1.Items.AddRange(New String() {"<b>bold</b> text", "<i>italic</i>", "<u>underline</u>"})
checkedListBoxControl1.AllowHtmlDraw = DefaultBoolean.True

See Also

HtmlImages

Client

HTML-inspired Text Formatting

DefaultAllowHtmlDraw

BaseListBoxControl Class

BaseListBoxControl Members

DevExpress.XtraEditors Namespace