Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DefaultValue(DefaultBoolean.Default)]
[DXCategory("Behavior")]
public DefaultBoolean AllowHtmlDraw { get; set; }

#Property Value

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

#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.

ListBoxControl-HtmlDraw

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