FitAllColWidths

Declaration: ChartBook.Tables[].FitAllColWidths (ExpandColumn: integer; IncludeHeader: boolean; Addon, MaxWidth, RightMargin: integer);

The method FitAllColWidths is a combination of ExpandColWidth and AutoColWidth. It adjusts the column widths of all but the ExpandColumn column so that all cells are fully readable. The column headers are included in the calculation of the optimum column widths if IncludeHeader is set to TRUE. The property Addon defines an additional value which is added to the optimum width of each column. Addon may be negative (to reduce the column width); however, no column will be displayed using less than 4 pixels. The widths of all columns are restricted to a maximum of MaxWidth pixels.

The width of the column designated by ExpandColumn (1..NrOfColumns) is set in a way that the columns of the table cover the full width (less the RightMargin) of the control.