Skip to main content

TcxTreeListBand.Width Property

Specifies the band’s width, in pixels.

Declaration

property Width: Integer read; write; default 0;

Property Value

Type Default
Integer 0

Remarks

Use this property to set the custom band width. It cannot be less than the MinWidth property value. If the Width property is set to:

  • A custom value, changing the width of the band’s child bands or their columns does not affect the current band’s width.

  • 0 (that is, by default), the band’s width is calculated automatically based on the combined width of all the band’s child bands and their columns.

The TreeList control automatically adjusts the display widths of columns and bands when its OptionsView.ColumnAutoWidth property is set to True and the ApplyBestFit procedure is called. Use the DisplayWidth property to obtain the band’s width on a screen.

The Width property automatically updates by multiplying its current value by the form’s scaling factor every time it changes at design time or runtime.

To restore the band’s default MinWidth and Width property values, call the RestoreWidths procedure.

Note

Invoking the ApplyBestFit procedure provided by a TreeList control or the band sets the Width property to 0.

The default value of the Width property is 0.

See Also