windowsforms-devexpress-dot-xtraeditors-dot-baselistboxcontrol.md
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
[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean AllowHtmlDraw { get; set; }
<DefaultValue(DefaultBoolean.Default)>
<DXCategory("Behavior")>
Public Property AllowHtmlDraw As DefaultBoolean
| Type | Default | Description |
|---|---|---|
| DefaultBoolean | Default |
A DefaultBoolean value that specifies whether HTML tags can be used to format the text of the control’s items.
|
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
|
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.
The following example adds items to a CheckedListBoxControl and formats their display text using HTML tags.
checkedListBoxControl1.Items.AddRange(new string[] { "<b>bold</b> text", "<i>italic</i>", "<u>underline</u>" });
checkedListBoxControl1.AllowHtmlDraw = DevExpress.Utils.DefaultBoolean.True;
checkedListBoxControl1.Items.AddRange(New String() {"<b>bold</b> text", "<i>italic</i>", "<u>underline</u>"})
checkedListBoxControl1.AllowHtmlDraw = DefaultBoolean.True
See Also