TListColumn.AutoSize property
Resizes the column to the width needed for the list view Items or SubItems displayed in the column.
Declaration
property AutoSize: Boolean read FAutoSize write SetAutoSize default False;Description
AutoSize is a
Boolean property which indicates if the
column is automatically resized to fit the longest text value displayed in
the column. The default value for the property is
False.
Set AutoSize to True to enable auto-sizing for the column. Values in the Width, MinWidth, and MaxWidth properties are ignored when AutoSize is enabled.
Changing the value in AutoSize causes the Changed method to be called to updated the column in its Collection. The widgetset class for the list view control is notified of the changed value when its handle has been allocated.
Please note that the length of the Caption is not taken into consideration when calculating the auto-sized width. This can result in the Caption being truncated when the calculated width is too small.
Use the TCustomListView.AutoWidthLastColumn property to resize the last column to fill the unused area on the list view control. You cannot use both for the last column in the collection. The last property enabled takes precedence.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
