Back to Devexpress

TreeListOptionsView.AllowHtmlDrawHeaders Property

windowsforms-devexpress-dot-xtratreelist-dot-treelistoptionsview.md

latest3.3 KB
Original Source

TreeListOptionsView.AllowHtmlDrawHeaders Property

Gets or sets whether HTML formatting can be applied to column and band captions.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AllowHtmlDrawHeaders { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AllowHtmlDrawHeaders As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if HTML formatting can be applied to column and band captions; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowHtmlDrawHeaders
TreeList

.OptionsView .AllowHtmlDrawHeaders

|

Remarks

If the AllowHtmlDrawHeaders property is set to true , you can use HTML tags to format the TreeListColumn.Caption and TreeListBand.Caption. For detailed information see HTML Text Formatting.

Example

The following example shows how to display an image to the right of the Job Title column’s caption using HTML tags. The HTML formatting feature is enabled via the TreeListOptionsView.AllowHtmlDrawHeaders property.

csharp
string imageName = "customer";
imageCollection1.AddImage(Image.FromFile("c:\\customer-16x16.png"), imageName);

treeList1.OptionsView.AllowHtmlDrawHeaders = true;
treeList1.HtmlImages = imageCollection1;
colJobTitle.Caption = colJobTitle.GetCaption() + "<image=" + imageName + ">";
vb
Dim imageName As String = "customer"
imageCollection1.AddImage(Image.FromFile("c:\customer-16x16.png"), imageName)

gridView1.OptionsView.AllowHtmlDrawHeaders = True
gridView1.HtmlImages = imageCollection1
columnCustomer.Caption = columnCustomer.GetCaption() & "<image=" & imageName & ">"

See Also

HtmlImages

HTML-inspired Text Formatting

TreeListOptionsView Class

TreeListOptionsView Members

DevExpress.XtraTreeList Namespace