listview BestFit method
Return to Introduction  Previous page  Next page
Applies to
acListView and acDBListView components.  

procedure BestFit(FitHeaderText: Boolean = False);  

The BestFit method adjusts the column widths (of report-style list-view) thus the text of all subitems will fit to the widths of columns (maximum length of list items OR maximum length of text on the header).  
The FitHeaderText parameter controls whether the columns will be adjusted by length of list items or by length of header items. To make it fit the text of header — set FitHeaderText parameter to True (call this method as BestFit(True)).  
The equivalent of this method exists in every list-view. User can adjust the column widths pressing [Ctrl] + [Plus] keys.  

See also
BestFitItem property of HeaderMenu structure.