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.v19.2.dll
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 |
---|---|
True | Corresponds to a Boolean value of true. |
False | Corresponds to a Boolean value of false. |
Default | The value is determined by the current object’s parent object setting (e.g., a control setting). |
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.
Example
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;