The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



FitAllColWidths


Unit:SDL_replist
Class: TReportListView
Declaration: procedure 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 all columns of the report list view together cover the full width (less the RightMargin) of the control.


Last Update: 2023-Dec-13