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.v20.1.dll

Declaration

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

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.

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.

NOTE

You can attach a BaseListBoxControl to a SearchControl by using the SearchControl.Client property. When an end-user types a search request into the SearchControl, the BaseListBoxControl automatically filters its items, and highlights the requested string in the filtered items. Note that if items are formatted using the HTML tags, the items are filtered, but not highlighted.

Examples

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