Back to Devexpress

TreeListColumn.Width Property

windowsforms-devexpress-dot-xtratreelist-dot-columns-dot-treelistcolumn-44bcf988.md

latest2.9 KB
Original Source

TreeListColumn.Width Property

Gets or sets the column width in pixels.

Namespace : DevExpress.XtraTreeList.Columns

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
[DefaultValue(75)]
[XtraSerializableProperty(XtraSerializationFlags.AutoScaleX)]
[XtraSerializablePropertyId(3)]
public int Width { get; set; }
vb
<DefaultValue(75)>
<XtraSerializableProperty(XtraSerializationFlags.AutoScaleX)>
<XtraSerializablePropertyId(3)>
Public Property Width As Integer

Property Value

TypeDefaultDescription
Int3275

An integer value representing the column width in pixels.

|

Remarks

Use the Width property to adjust the column width. Note, however, that there can be situations when the value returned by this property doesn’t represent the actual column width. This takes place when enabling the TreeListOptionsView.AutoWidth option. In this case, columns are proportionaly resized to fit the width of the control. In fact, the TreeListColumn.Width properties of columns remain the same. The actual width of a column can be accessed via the TreeListColumn.VisibleWidth property in this case.

The actual value that you can set using the Width property is limited by the TreeListColumn.MaxWidth and TreeListColumn.MinWidth property values.

See Also

VisibleWidth

AutoWidth

MaxWidth

MinWidth

ActualMinWidth

ActualMaxWidth

TreeListColumn Class

TreeListColumn Members

DevExpress.XtraTreeList.Columns Namespace